Commit Graph

125 Commits

Author SHA1 Message Date
Piotr Sarnacki
857af4fde0 Use Accept entries for getting API version 2015-07-07 12:45:30 +02:00
Piotr Sarnacki
66f5d71d1a Remove triggering builds in V2 2015-06-15 12:22:42 +02:00
Sven Fuchs
587a1a0f80 Auto-merged master into sf-throttle-request-receive on deployment. 2015-04-30 11:33:40 +02:00
Piotr Sarnacki
3cac519143 Ensure that both ways to get repos by ids are tested
In 222a970 I added a way to get repos by ids using format ids=1,2,3. It
turned out that getting by ids was already supported with
ids[]=1&ids[]=2 format, but it wasn't tested. I added tests for both
methods and left the comma separated ids list as we already support it
in other places.
2015-04-16 13:49:23 +02:00
Piotr Sarnacki
222a97028a Allow to get repositories by ids 2015-04-16 13:42:33 +02:00
Konstantin Haase
20e9448dc1 Merge pull request #146 from cscott/bug-145
Allow branch names to contain slashes.
2015-02-23 12:51:17 +01:00
carlad
8f6083117c add async method to send exception error to sentry
add ErrorHandling class, refactor spec

correct the raven config class

correct the raven test

add a fake method for getting an exception

require error_handling

add new TestError class to test exceptions

add correct error class to test

add rescue block to raven send

make method a class method and add a test Travis.config.dns

add error the repos to test error

remove carla method in repos

add a fake error in repos

delete carla method
2015-02-13 16:16:45 +01:00
Sven Fuchs
a395ba865d throttle build request receive api 2015-02-11 17:46:55 +01:00
carlad
517a3b04f7 Revert "Revert "Merge branch 'master' of github.com:travis-ci/travis-api""
This reverts commit 171b9c57c7.
2015-01-27 16:22:30 +01:00
Konstantin Haase
171b9c57c7 Revert "Merge branch 'master' of github.com:travis-ci/travis-api"
This reverts commit 1b8f77ab36, reversing
changes made to 79a4a9ad13.
2015-01-27 14:39:36 +01:00
carlad
6991c6bb2b update spec 2015-01-27 13:34:12 +01:00
carlad
f39d931857 update response status ans specs 2015-01-27 13:31:12 +01:00
Tyranja
a9c31fa5e9 Extract cancel and restart builds and jobs into sidekiq worker
See below for all the commit messages squashed into this one...
add a test

delete empty space

add job_cancellation worker

change id

change job_id param

add job restart worker

add require to sidekiq.rb

change params

add test for job restart and cancellation

add test for job restart

update build.rb improve build spec

update job restart with correct response, add test to chack for correct response when restarting job
2015-01-26 17:29:13 +01:00
Tyranja
057e9f0379 add Sidekiq for cancelling build
:
add require sidekiq to the sidekiq.rb

update Gemfile.lock

bump travis-sidekiqs

correct require statement

fix another request

connect to the database

add current user

add current user correctly

add current user correctly

add puts to see were in the condition we are

missing invertted comma

add comments to the worker

I HAVE NO IDEA

Revert "I HAVE NO IDEA"

This reverts commit 8bd1259bf4ea1b479f9391847a4700b7b15efe57.

change the id and source to symbols in the params because siedekiq expects that

add more printout

setup database connection, metrics and notification

correct the test
2015-01-23 14:43:54 +01:00
carlad
9b4d121956 refactor buildcancellation worker 2015-01-22 14:41:38 +01:00
Piotr Sarnacki
628b356964 I can't into timezones 2015-01-12 13:00:07 +01:00
Piotr Sarnacki
302927bad6 removed_at in tests should be in utc 2015-01-12 12:56:04 +01:00
Piotr Sarnacki
6846d2f783 Return log with chunks if chunked response is requested for removed log 2015-01-09 14:39:57 +01:00
Piotr Sarnacki
43e20332cf Return removed_at and removed_by if the log was removed 2015-01-09 14:28:30 +01:00
C. Scott Ananian
7ba84757dc Allow branch names to contain slashes
Fixes: #145
2014-11-13 01:06:26 -05:00
C. Scott Ananian
e45aa12d97 Add spec for /repos/*/branches/* endpoint 2014-11-13 00:05:24 -05:00
C. Scott Ananian
0cdafcc9c0 Add spec for /repos/*/branches endpoint 2014-11-12 22:16:14 -05:00
Sven Fuchs
193c749cd1 fix settings env var api specs 2014-10-07 19:14:40 +02:00
Sven Fuchs
58ce449ca4 fix specs for rspec 2014-10-07 16:48:21 +02:00
Piotr Sarnacki
890b7f1d93 Fix Accept header support for logs request
When log is aggregated and archived we don't have a way to return it in
JSON format, only text format. Till recently we were returning a text
response or a redirect to S3 even if Accept header was set only to JSON.
This commit fixes it.
2014-09-11 17:44:36 +02:00
Piotr Sarnacki
07cd97a90f Add "after" param to log
after query param allows to get only parts that come after a specified
number, for example "after: 10" will download only parts that come after
10th part.
2014-09-11 14:36:19 +02:00
Piotr Sarnacki
65a90fd5d7 Fix specyfing part_numbers in API
Recently I've implmented a way to get only specific parts from log API,
but the test and implementation were wrong. This commit fixes that.
2014-09-11 14:35:33 +02:00
Piotr Sarnacki
68a49057ca Fix specs, namespace for settings endpoints changed 2014-09-10 11:05:35 +02:00
Piotr Sarnacki
6e5f225a1c Don't reset the value if a new value is provided
If a value is provided with a request to update the record, we should
not nullify it. We don't send decrypted private values to the client, so
if client provides it, it's probably pasted by the user.
2014-09-10 11:02:24 +02:00
Piotr Sarnacki
e103b291ad Reset value when env var is changed from private to public
When env var is changed from private to public, we didn't nullify it, so
someone doing that could miss exposing it. To minimise the risk of
exposing any secure info we'll now nullify the value.
2014-09-10 10:46:29 +02:00
Piotr Sarnacki
4546d29508 Add ability to specify parts in query to get log 2014-08-27 15:52:52 +02:00
Piotr Sarnacki
d7c6edec18 Bring back ssh key endpoint, but make it configurable 2014-07-29 03:02:54 +02:00
Piotr Sarnacki
b9db32e3c2 Treat repository_id as id for singleton settings 2014-07-23 13:34:30 +02:00
Piotr Sarnacki
4005760c8c Add SingletonSettingsEndpoint
This class allows to easily add an endpoint for a nested model in
settings.
2014-07-21 17:09:32 +02:00
Piotr Sarnacki
9ae3782975 Don't return collections along with simple settings 2014-07-16 18:20:35 +02:00
Piotr Sarnacki
696185e3cd Return repository_id for env vars 2014-07-16 18:14:52 +02:00
Piotr Sarnacki
2e8fc35e13 Properly validate settings 2014-07-15 16:26:24 +02:00
Piotr Sarnacki
fa56e4cfa0 Update code and specs for newest travis-core changes 2014-07-15 16:25:55 +02:00
Hiro Asari
6d3a65b541 Merge branch 'master' into ps-env-vars-in-settings
Conflicts:
	Gemfile.lock
2014-06-18 08:38:49 -04:00
Hiro Asari
dae8652279 Merge branch 'master' into ha-feature-remove_log_endpoint 2014-06-17 10:40:30 -04:00
Hiro Asari
9265ac62c9 Merge branch 'master' into ha-feature-remove_log_endpoint
Conflicts:
	Gemfile.lock
	travis-api.gemspec
2014-06-17 09:05:05 -04:00
Konstantin Haase
143a9cd071 Revert "removed the branches endpoint"
This reverts commit f7450cdb6b.
2014-06-17 14:44:13 +02:00
Hiro Asari
8d4c4488b1 Merge pull request #94 from travis-ci/jk_remove_branches_endpoint
Remove the branches endpoint
2014-06-16 11:36:59 -04:00
Hiro Asari
1cf298464a Add RemoveLog service endpoint to jobs/:id/log
This replaces https://github.com/travis-ci/travis-api/pull/107.
2014-06-11 13:39:21 -04:00
Piotr Sarnacki
3ef8fab3c6 Add settings endpoint for env_vars 2014-05-23 13:42:22 +02:00
Piotr Sarnacki
360881a888 Remove ssh_keys endpoint
SshKeys will make sense only on Travis CI Pro
2014-04-15 11:14:11 +02:00
Piotr Sarnacki
f107d4676e Params in POST and PATCH requests should be fetched from request body
This also adds missing specs for ssh_keys endpoint
2014-04-10 14:07:20 +02:00
Piotr Sarnacki
11e814055e Fix specs 2014-04-01 16:52:33 +02:00
Piotr Sarnacki
e9cdef1c9b Add /settings/ssh_keys API 2014-04-01 13:05:25 +02:00
Piotr Sarnacki
1b524071f4 Allow to handle settings collections 2014-04-01 12:00:06 +02:00