Commit Graph

38 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
Mathias Meyer
a635f7d916 Add Badge to available responders. 2014-03-19 15:01:23 +01:00
Hiro Asari
4556fdf8e1 Account for absence of pretty parameter 2013-11-15 09:43:07 -05:00
Hiro Asari
0e406b3ed1 Accept pretty parameter for pretty formatting
If the parameter is equal to `true` (in any case--`TRUE`, `True`) or
a positive integer, return pretty formatted JSON data.

No tests are necessary.
2013-11-15 09:19:25 -05:00
Hiro Asari
da62a6ce3c Pretty print JSON data
See travis-ci/travis-ci#1555.

JSON data are pretty-formatted for humans.
2013-11-14 21:29:33 -05: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
e945476c8d Prefer JSON to Atom feed
We should not break the current behavior when the client sends
`Accept: */*` HTTP header.
2013-11-11 11:42:48 -05:00
Hiro Asari
3fa96de682 WIP: Atom feed for /repos/:owner_name/:name/builds
See travis-ci/travis-core#82

TODO: Link to indivisual build.
TODO: Add specs.
TODO: Review `#apply?`
2013-11-11 09:03:23 -05:00
Piotr Sarnacki
a49265f872 Disable follower for now 2013-09-10 12:05:18 +02:00
Piotr Sarnacki
1a3ab7f2a7 Always use follower if it's available 2013-09-06 19:49:16 +02:00
Piotr Sarnacki
2492d710e1 Use new follower API added to Travis::Model 2013-09-04 16:22:32 +02:00
Piotr Sarnacki
1340fdb316 Allow to pass additional responders to respond_with 2013-05-08 14:11:02 +02:00
Piotr Sarnacki
935288e8e9 Don't load octopus if there is no need 2013-05-05 00:27:10 +02:00
Josh Kalderimis
23f3edc60c move the db follower usage to a helper 2013-05-03 09:21:48 +02:00
Piotr Sarnacki
5f91706e64 Allow to pass version as Accept param 2013-02-25 17:28:24 +01:00
Piotr Sarnacki
65b1e6b988 Respond with 406 if we can't return requested formats 2013-02-25 17:27:56 +01:00
Piotr Sarnacki
212eb6d9d3 Allow passing more than one mime type in Accept 2013-02-25 17:27:56 +01:00
Piotr Sarnacki
1d7be066cb Make it easy to check if Accept::Entry accepts given mime type 2013-02-25 17:27:56 +01:00
Piotr Sarnacki
c9e99cf2cf Allow more than one type in Accept header 2013-02-25 17:27:56 +01:00
Piotr Sarnacki
70cd6ef092 Allow to download logs in plain text 2013-01-15 02:23:02 +01:00
Piotr Sarnacki
2f21def4a1 Use API v1 by default 2012-11-11 20:39:59 +01:00
Konstantin Haase
e1110034d1 prefix env key 2012-11-08 14:31:18 +01:00
Sven Fuchs
a74a7121d1 rename to signed_in? 2012-10-13 18:27:44 +02:00
Sven Fuchs
209dbe2a85 rename services, remove service helpers 2012-10-12 01:28:35 +02:00
Sven Fuchs
8abd6fa150 manual redirects and rewrite rules for supporting v1 style resources 2012-10-10 01:48:22 +02:00
Sven Fuchs
a7d72beefc move responders out of helpers 2012-10-09 20:51:09 +02:00
Sven Fuchs
903f249cfb moar refactoring on responders, fix specs 2012-10-09 18:28:46 +02:00
Sven Fuchs
494a85d968 refactor responders 2012-10-09 15:17:10 +02:00
Sven Fuchs
fa4c5db39b set default version to v2 for easier query/performance inspection for now 2012-10-08 13:22:36 +02:00
Sven Fuchs
2b290b9571 fix requests endpoint, routes order for permissions, raise on undefined builder 2012-10-07 16:58:01 +02:00
Sven Fuchs
4328ba8649 adapt services changes from travis-core 2012-10-05 13:06:50 +02:00
Sven Fuchs
f6957636fb refactor to responders, add the cc.xml stuff 2012-10-03 02:19:16 +02:00
Sven Fuchs
7eceeb2842 moar work on acceptance tests 2012-10-02 19:10:29 +02:00
Sven Fuchs
289f7c1486 start porting api integration tests 2012-10-02 16:39:38 +02:00
Sven Fuchs
dfc6a1273e figure out the api version from HTTP_ACCEPT 2012-10-01 14:58:06 +02:00
Konstantin Haase
e99c5c2d4f move helpers around 2012-09-28 16:54:29 +02:00
Piotr Sarnacki
159a8e105b Implement a few missing endpoints 2012-08-10 13:41:25 +02:00
Konstantin Haase
7baf61054c rewrite all the things 2012-07-27 15:55:57 +02:00