Commit Graph

91 Commits

Author SHA1 Message Date
Henrik Hodne
8f4dd0d2df Respond with 422 if /auth/github does not get a token
Fix #77
2013-10-23 19:35:03 -05:00
Piotr Sarnacki
0681e54cf1 Run CORS middleware in development 2013-09-20 12:47:14 +02:00
Piotr Sarnacki
8d1a3b2bea Bump travis-core (repos?member=:member fix) 2013-09-12 13:52:32 +02:00
Piotr Sarnacki
e587ef0b7f Add nginx config with CORS support 2013-09-05 22:48:42 +02:00
Piotr Sarnacki
383d233d9e Add missing spec for UserManager (when drop_token is true) 2013-08-02 13:18:54 +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
3508f25bdf Nullify logins and rename repos owner when updating/creating user 2013-07-10 01:38:10 +02:00
Josh Kalderimis
cf66b6bb6d raise_error(Error) is deprecated 2013-07-08 13:38:50 +02:00
Mathias Meyer
c75f76aefb Remove spec for auto-using custom middlewares. 2013-05-18 11:19:15 +02:00
Mathias Meyer
0cd89de38a Merge branch 'master' into rkh-metrics
Conflicts:
	Gemfile.lock
2013-05-09 13:37:28 +02:00
Piotr Sarnacki
cdabec540d Fix scopes and access token specs 2013-05-08 14:11:03 +02:00
Piotr Sarnacki
56d61ed461 Allow to pass extra params for tokens 2013-05-08 14:11:02 +02:00
Piotr Sarnacki
1340fdb316 Allow to pass additional responders to respond_with 2013-05-08 14:11:02 +02:00
Piotr Sarnacki
01356df26f Implement expiring access tokens 2013-05-08 14:11:02 +02:00
Konstantin Haase
0d2188b5b2 fix specs 2013-04-24 16:59:26 +02:00
Piotr Sarnacki
f3ceee9b28 Always set content_type in responder 2013-03-25 16:39: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
5f91706e64 Allow to pass version as Accept param 2013-02-25 17:28:24 +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
c6e3c29a57 Load the data for integration tests upfront
We can do it, because we use :transaction strategy with DatabaseCleaner,
which starts transaction before each test and rollbacks after it. That
way data before each test is consistent.

The big advantage of such approach is that tests are fast now - we need
to only load Scenario data once.

One of the drawbacks, on the other hand, is that we need to always load
this data, even if no integration tests need running.

We can try to be smart about it and check if any integration tests are
loaded.
2013-01-26 00:00:42 +01:00
Konstantin Haase
07c5f6b61f add extension that keeps track of route pattern 2013-01-23 15:22:06 +01:00
Piotr Sarnacki
e6899b3ce6 Allow to remove ansi chars from plain text log 2013-01-15 02:27:06 +01:00
Piotr Sarnacki
70cd6ef092 Allow to download logs in plain text 2013-01-15 02:23:02 +01:00
Konstantin Haase
01fe983a0c pass if scope does not match 2013-01-13 20:08:56 +01:00
Konstantin Haase
cc2a1cd50e do not require user scope for /auth/github 2013-01-11 17:48:30 +01:00
Konstantin Haase
3d6defe3b1 do not store token from /auth/github 2013-01-11 16:49:08 +01:00
Konstantin Haase
ada6ee0f2c fix scope check 2013-01-11 16:20:53 +01:00
Konstantin Haase
94d8a3cd2e fix failing spec 2013-01-07 21:02:00 +01:00
Konstantin Haase
b005047d95 rename token parameter to github_token for /auth/github 2012-12-12 18:30:55 +01:00
Konstantin Haase
bc1c960c20 add travis_token scope 2012-12-12 17:11:25 +01:00
Sven Fuchs
353b5fa502 use registered services 2012-11-23 21:16:10 +01:00
Piotr Sarnacki
f0f471f1c6 Fix updating github oauth token after signing in 2012-11-12 17:15:28 +01:00
Piotr Sarnacki
2f87153df9 Move CORS middleware in front of the stack
If there is an error somewhere along the line (like in DB connection
management), it should not interfere with returning proper result for
OPTIONS request. Otherwise it's hard to guess why the actual request in
the browser was not properly sent.
2012-11-05 21:48:13 +01:00
Piotr Sarnacki
505b2fb911 No need to revalidate if resource is final 2012-11-01 16:15:06 +01:00
Sven Fuchs
270c2fb82d re-add flash messages 2012-10-14 15:11:05 +02:00
Sven Fuchs
1b9bc9b039 fix specs for cors 2012-10-11 14:07:51 +02:00
Sven Fuchs
f6957636fb refactor to responders, add the cc.xml stuff 2012-10-03 02:19:16 +02:00
Sven Fuchs
289f7c1486 start porting api integration tests 2012-10-02 16:39:38 +02:00