Commit Graph

101 Commits

Author SHA1 Message Date
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
Piotr Sarnacki
400b6ae6ee Add /requests/:id endpoint 2014-03-12 10:50:16 +01:00
Piotr Sarnacki
093831c1a2 Add requests API
Requests API allows to get the requests from the DB and thus enable
users to have more insight into what's going on in their repositories.
2014-03-06 19:36:55 +01:00
Hiro Asari
b43568a0f9 Fix Annoation-related specs
Annotations are now blocked by features, so stub the service to
return true for the cases we expect to get data back from POST
requests
2014-01-29 14:30:23 -05:00
Hiro Asari
8e1b190725 Require status for updating Annotation and bump travis-core 2014-01-22 09:34:26 -05:00
Hiro Asari
8ce826cda0 Merge branch 'master' into hh-add-metadata-endpoint
Conflicts:
	Gemfile.lock
2014-01-20 22:30:35 -05:00
Sven Fuchs
0c6576fec1 Merge pull request #99 from travis-ci/ha-api-gh47-aggregate-cc-xml
Respond to /repos.xml with CC XML
2014-01-17 12:50:26 -08:00
Hiro Asari
a622de2a9f Merge branch 'master' into hh-add-metadata-endpoint
Update Gemfile.lock to point to the updated travis-core PR

Conflicts:
	Gemfile.lock
	lib/travis/api/app/endpoint/jobs.rb
	spec/integration/v2/jobs_spec.rb
2014-01-17 09:16:41 -05:00
Piotr Sarnacki
e11dfa35cf Fix PATCH repos/:id/settings 2013-12-02 15:36:58 +01:00
Piotr Sarnacki
62a5e602c5 Implement simple repository settings API 2013-12-02 15:36:25 +01:00
Hiro Asari
d31a29e54d Fix grammar in spec description 2013-12-01 20:42:46 -05:00
Piotr Sarnacki
39260c3918 Fix specs after travis-core update 2013-11-28 18:08:39 +01:00
Hiro Asari
362b5d30bf Respond to /repos.xml with CC XML
See #47
2013-11-18 16:55:11 -05:00
Piotr Sarnacki
e61a723d06 Fix scoping spec
After bundle update 403 error was returned after unsuccessful scopes
check. This is actually a proper behaviour, so I'm changing test to
reflect this test.
2013-11-12 22:16:47 +01:00
Hiro Asari
3b20120c72 Accept .atom extension
And return Atom feed for builds.
Specs look different, because it needs to explicitly handle the common
case where the client sends `Accept: */*`.
2013-11-11 15:21:14 -05:00
Hiro Asari
8171d3915e Add integration specs for Atom feed
These rudimentary specs do not test the correctness of
the Atom feed format.
2013-11-11 11:40:37 -05:00
Josh Kalderimis
f7450cdb6b removed the branches endpoint
we already have branch info accessible via the repos endpoints, having this at the root level doesn't make sense.
2013-11-06 01:40:42 +01:00
Josh Kalderimis
342df12b14 remove old workers endpoints 2013-11-04 19:24:17 +01:00
Mathias Meyer
9d26844eaa Add tests for /uptime. 2013-08-26 17:29:10 +02:00
Piotr Sarnacki
f19de9d134 Implement jobs/:id/cancel and builds/:id/cancel endpoints 2013-08-08 14:25:20 +02:00
Henrik Hodne
be2c538d9e Rename metadata => annotations 2013-07-10 16:55:03 -07:00
Henrik Hodne
16a73d9e0b Add PUT /jobs/:id/metadata endpoint 2013-07-09 18:41:47 -07:00
Henrik Hodne
b103a7ccb1 Add GET /jobs/:job_id/metadata endpoint 2013-07-09 18:15:32 -07:00
Piotr Sarnacki
b6a351c766 Convert params['ids'] to array
Services like find_builds can accept :ids as a param, but it needs to be
an array, string will be passed to find and converted into integer.
2013-07-09 15:18:31 +02:00
Piotr Sarnacki
29fb7292cb Fix tests 2013-06-13 15:54:19 +02:00