Piotr Sarnacki
43e20332cf
Return removed_at and removed_by if the log was removed
2015-01-09 14:28:30 +01:00
Sven Fuchs
05494f4acf
allow returning a symbol as a result from services, set status based on the symbol
2014-10-21 17:12:13 +02:00
Mathias Meyer
223cf949a1
Fix another variable.
2014-06-18 11:55:27 +02:00
Mathias Meyer
d9bf47c36a
Fix variable name.
2014-06-18 11:55:27 +02:00
Mathias Meyer
415d266f61
Fix typo.
2014-06-18 11:55:27 +02:00
Mathias Meyer
e726b1b697
Fix ERb line.
2014-06-18 11:55:27 +02:00
Mathias Meyer
a7f0a861cb
Fetch last build if no branch specified.
...
This restores backwards compatibility with the current behaviour
rather than defaulting to master. Though the latter would probably
the right thing to do in the longer term.
2014-06-18 11:55:26 +02:00
Mathias Meyer
5081bb157f
Skip including a build if it doesn't exist.
...
This catches branch specifications where no build is available.
2014-06-18 11:55:26 +02:00
Mathias Meyer
99395d85c1
Delete TODO.
2014-06-18 11:55:26 +02:00
Mathias Meyer
b81b24b3ce
Make master a string.
2014-06-18 11:55:26 +02:00
Mathias Meyer
3f16100247
Support the branch option for cc.xml requests.
...
Fixes travis-ci/travis-ci#2090
2014-06-18 11:55:26 +02:00
Piotr Sarnacki
c42335a286
Merge pull request #117 from travis-ci/ps-ssh-keys
...
Add ssh keys to settings API
2014-04-15 10:59:59 +02:00
Piotr Sarnacki
a926ac1945
Render strings as text/plain
2014-04-08 15:22:33 +02:00
Piotr Sarnacki
1b524071f4
Allow to handle settings collections
2014-04-01 12:00:06 +02:00
Mathias Meyer
515ffb8a8a
Return right mime type for SVG.
2014-03-19 15:05:11 +01:00
Mathias Meyer
e85d19d33d
Add responder for svg badges.
2014-03-19 14:31:38 +01:00
Hiro Asari
ea05ef6845
Fix closing tag
2013-12-01 22:22:00 -05:00
Hiro Asari
1eb8ce5a1d
Add missing closing </Project> tag
2013-12-01 22:01:12 -05:00
Hiro Asari
ac106488c7
Eschew questionable use of File.join
...
For constructing a URL, `File.join` is inappropriate.
2013-12-01 20:44:39 -05:00
Hiro Asari
1727b5328e
Indent comment to match logic level
2013-11-19 01:21:14 -05:00
Hiro Asari
67decdfc6a
Cast ActiveRecord::Relation into an Array
2013-11-19 01:19:21 -05:00
Hiro Asari
0fe9e6da90
Remove superfluous ivar
2013-11-18 18:21:32 -05:00
Hiro Asari
362b5d30bf
Respond to /repos.xml with CC XML
...
See #47
2013-11-18 16:55:11 -05:00
Hiro Asari
fbf98f9ceb
Tweak feed and entry's IDs
2013-11-11 15:43:47 -05:00
Hiro Asari
2645422fd3
Atom feed's date should conform to RFC 3339.
2013-11-11 15:32:41 -05:00
Hiro Asari
ea3a5a7a0d
Encode commit message
...
So that HTML/XML tags in messages don't break the feed.
2013-11-11 14:14:56 -05:00
Hiro Asari
53d2e950b9
Set update element to RFC3339 format
...
This is required by the RFC.
http://tools.ietf.org/html/rfc4287#section-3.3
2013-11-11 13:56:10 -05:00
Hiro Asari
26bdd84ae6
Eradicate @builds
...
Unclear if ivar is beneficial here.
2013-11-11 11:39:06 -05:00
Hiro Asari
30b60283f8
Construct build result URL from parts
...
Currently, there is no easy way to grab this information from
the Build model.
So we need to construct it from various parts at our disposal.
2013-11-11 09:39:13 -05:00
Hiro Asari
148f2477e8
Use here-doc for Atom feed template
...
Rather than unnaturally re-reading __FILE__ and splitting,
use a here-doc to clarify the intent.
(Should also consider splitting it to a file.)
2013-11-11 09:03:23 -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
Josh Kalderimis
0c3b4d60eb
Merge pull request #79 from travis-ci/hh-xml-responder-nil-last-build
...
Only allow XML response if repo has a build
2013-10-27 10:02:10 -07:00
Henrik Hodne
65267795f1
Only allow image responses for repositories
2013-10-26 08:19:01 -05:00
Henrik Hodne
44f274d306
Only allow XML response if repo has a build
2013-10-26 08:14:40 -05:00
Piotr Sarnacki
1340fdb316
Allow to pass additional responders to respond_with
2013-05-08 14:11:02 +02:00
Piotr Sarnacki
887c835bd4
Use client_domain instead of domain for url in CC.xml
2013-03-25 16:53:20 +01:00
Piotr Sarnacki
15dd13ba02
Merge branch 'pr/46'
2013-03-25 16:40:08 +01:00
Piotr Sarnacki
f3ceee9b28
Always set content_type in responder
2013-03-25 16:39:37 +01:00
Andre Arko
2935050395
https is better
2013-03-25 16:16:42 +01:00
Andre Arko
c57e9cbcc6
valid URLs in cc.xml Project webUrl
2013-03-25 16:09:37 +01:00
Piotr Sarnacki
61142c7cf6
Return 404 unless we can find API builder for resource
...
In order to protect us from rendering a resource simply converted to
json, without processing it with API data class, this commit changes
JSON responder behavior to render 404 if we can't find associated data
class. The only exception to that rule is when resource is already a
Hash, meaning that it was processed before - we sometimes return for
example simple Hash responses like { result: true }.
The Hash exception could allow to accidentally pass resource.as_json to
responder, but in travis-ci/travis-support@124b8b6 I disabled default
as_json method on AR::Base classes, so the risk of such mistake is
lowered.
2013-03-24 19:49:28 +01:00
Piotr Sarnacki
705927ff74
Don't error out if xml is requested with something else than repo
2013-03-12 12:08:43 +01:00
Piotr Sarnacki
54a6926aaf
Properly handle non existent resources
...
This commit changes travis-api to always return 404 response if resource
is not available. Previously we were returning image/png with "unknown"
status instead if user used "*/*" Accept header, which was confusing.
2013-03-11 23:52:57 +01:00
Piotr Sarnacki
b6f3ef10aa
Resource can be nil in Responders::Image
2013-03-11 20:57:45 +01:00
Piotr Sarnacki
04bb751b02
When serving image, return proper Last-Modified header
2013-03-11 20:54:24 +01:00
Piotr Sarnacki
5345ef818e
Use version from each of the accept headers, not only first one
2013-02-25 17:28:24 +01:00
Piotr Sarnacki
36783e6359
Handle chunked=true param in Accept header
2013-02-25 17:28:24 +01:00
Piotr Sarnacki
212eb6d9d3
Allow passing more than one mime type in Accept
2013-02-25 17:27:56 +01:00
Sven Fuchs
7e005aad1b
use travis-core/sf-log-models
2013-02-10 21:30:50 +01:00
Konstantin Haase
593920ce81
add Pragma header for caches that do not understand Cache-Control, see #38
2013-01-21 21:18:16 +01:00