Permalink
Browse files

Fixes cassettes endpoints.

  • Loading branch information...
Brian Leonard & Steve Hull authored and nolastan committed Sep 13, 2012
1 parent 4ee1309 commit f11ec2fd444a84c96d3a2cd99d8ba74551863cbb
View
@@ -4,7 +4,7 @@ class Offer < Smash
property :charge_price
property :comment
property :state
- property :runner, :transformer => User
+ property :runner_id
class << self
def all(scope, options = {})
View
@@ -72,7 +72,8 @@ def delete!
end
def reload(method, path, options = {})
- super(method, path, self.class.options_with_class_includes(options))
+ options = self.class.options_with_class_includes(options) if method.to_s == 'get'
+ super(method, path, options)
end
end
end
@@ -33,7 +33,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/users/49720/tasks?
+ uri: https://taskrabbitdev.com/api/v1/users/49720/tasks?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,7 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/tasks?
+ uri: https://taskrabbitdev.com/api/v1/tasks?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:
@@ -2,41 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/tasks/22545?
- body:
- headers:
- x-client-application:
- - <API_SECRET>
- authorization:
- - OAuth
- response: !ruby/struct:VCR::Response
- status: !ruby/struct:VCR::ResponseStatus
- code: 200
- message: OK
- headers:
- etag:
- - ! '"1abb040c2b73a76e1261969893a363f8"'
- content-type:
- - application/json; charset=utf-8
- x-runtime:
- - '752'
- server:
- - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
- date:
- - Sat, 17 Mar 2012 23:12:39 GMT
- content-length:
- - '774'
- cache-control:
- - private, max-age=0, must-revalidate
- body: ! '{"name":"2 Hours of House Cleaning + 1 Hour of House Chores","city":{"name":"SF
- Bay Area","lng":-122.419416,"id":3,"links":{"get":"/api/v1/cities/3"},"lat":37.77493},"complete_by_time":1318381200,"id":22545,"state_changed_at":1317839370,"cost_in_cents":0,"links":{"html":"http://local.taskrabbit.com/tasks/task--278","get":"/api/v1/tasks/22545"},"runners":{"items":[]},"state_label":"closed","assign_by_time":1318014000,"user":{"city":{"name":"SF
- Bay Area","lng":-122.419416,"id":3,"links":{"get":"/api/v1/cities/3"},"lat":37.77493},"id":49658,"links":{"get":"/api/v1/users/49658","avatar_url":"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png"},"full_name":"Jean-Richard
- L.","short_name":"Jean-Richard","display_name":"Jean-Richard L."},"state":"closed"}'
- http_version: '1.1'
-- !ruby/struct:VCR::HTTPInteraction
- request: !ruby/struct:VCR::Request
- method: :get
- uri: https://taskrabbitdev.com:443/api/v1/tasks/52?
+ uri: https://taskrabbitdev.com/api/v1/tasks/52?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:
@@ -2,44 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/tasks/22545?
- body:
- headers:
- x-client-application:
- - <API_SECRET>
- authorization:
- - OAuth
- response: !ruby/struct:VCR::Response
- status: !ruby/struct:VCR::ResponseStatus
- code: 200
- message: OK
- headers:
- etag:
- - ! '"d7e8594808d34c7e4e8d87737f8ec5dc"'
- content-type:
- - application/json; charset=utf-8
- x-runtime:
- - '726'
- server:
- - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
- date:
- - Sat, 17 Mar 2012 23:31:20 GMT
- content-length:
- - '1432'
- cache-control:
- - private, max-age=0, must-revalidate
- body: ! '{"name":"2 Hours of House Cleaning + 1 Hour of House Chores","city":{"name":"SF
- Bay Area","lng":-122.419416,"id":3,"links":{"get":"/api/v1/cities/3"},"lat":37.77493},"complete_by_time":1318381200,"id":22545,"state_changed_at":1332026993,"cost_in_cents":0,"runner":{"city":{"name":"Boston","lng":-71.059773,"id":1,"links":{"get":"/api/v1/cities/1"},"lat":42.358431},"runner":true,"id":66,"links":{"get":"/api/v1/users/66","avatar_url":"http://s3.amazonaws.com/taskrabbit-dev/avatars/66/thumb/jordan.png?1276495549"},"full_name":"Jordan
- H.","short_name":"Jordan","display_name":"Jordan H."},"links":{"html":"http://local.taskrabbit.com/tasks/task--278","get":"/api/v1/tasks/22545"},"runners":{"items":[{"city":{"name":"Boston","lng":-71.059773,"id":1,"links":{"get":"/api/v1/cities/1"},"lat":42.358431},"id":66,"runner":true,"short_name":"Jordan","full_name":"Jordan
- H.","links":{"get":"/api/v1/users/66","avatar_url":"http://s3.amazonaws.com/taskrabbit-dev/avatars/66/thumb/jordan.png?1276495549"},"display_name":"Jordan
- H."}]},"state_label":"closed","assign_by_time":1318014000,"user":{"city":{"name":"SF
- Bay Area","lng":-122.419416,"id":3,"links":{"get":"/api/v1/cities/3"},"lat":37.77493},"id":49658,"links":{"get":"/api/v1/users/49658","avatar_url":"http://local.taskrabbit.com/images/default_avatars/poster_thumb.png"},"full_name":"Jean-Richard
- L.","short_name":"Jean-Richard","display_name":"Jean-Richard L."},"state":"closed"}'
- http_version: '1.1'
-- !ruby/struct:VCR::HTTPInteraction
- request: !ruby/struct:VCR::Request
- method: :get
- uri: https://taskrabbitdev.com:443/api/v1/tasks/52?
+ uri: https://taskrabbitdev.com/api/v1/tasks/52?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:
@@ -33,7 +33,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/tasks/22679?
+ uri: https://taskrabbitdev.com/api/v1/tasks/22679?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:
@@ -1,57 +1,12 @@
---
-- !ruby/struct:VCR::HTTPInteraction
- request: !ruby/struct:VCR::Request
- method: :get
- uri: https://taskrabbitdev.com:443/api/v1/tasks/52?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes&include[offer][]=errors&include[offer][]=links&include[offer][]=error&include[offer][]=id&include[offer][]=charge_price&include[offer][]=comment&include[offer][]=state&include[offer][]=runner
- body:
- headers:
- x-client-application:
- - <API_SECRET>
- authorization:
- - OAuth <USER_WITH_CARD>
- response: !ruby/struct:VCR::Response
- status: !ruby/struct:VCR::ResponseStatus
- code: 200
- message: OK
- headers:
- server:
- - nginx/1.0.11
- date:
- - Thu, 13 Sep 2012 00:15:04 GMT
- content-type:
- - application/json; charset=utf-8
- status:
- - 200 OK
- set-cookie:
- - current_geo=1053; path=/; expires=Tue, 13-Nov-2012 01:15:04 GMT
- x-runtime:
- - '0.233808'
- content-length:
- - '1625'
- etag:
- - ! '"7752ebc8b69f2bd2122470c71bff137e"'
- x-ua-compatible:
- - IE=Edge,chrome=1
- cache-control:
- - max-age=0, private, must-revalidate
- body: ! '{"private_runner":false,"links":{"put":"/api/v1/tasks/52","html":"http://s-app1.taskrabbit.com/tasks/house-cleaning-7091","get":"/api/v1/tasks/52","offers":"/api/v1/tasks/52/offers","authenticated":"http://s-app1.taskrabbit.com/go/82d359e524666a2d8b96f6df1fbfcad4a720a0b4fed8c3f0985139a13a4d6433b65f7f05e80360af131d8f9638f8307e035b","delete":"/api/v1/tasks/52"},"charge_price":0,"runners":{"items":[]},"cost_in_cents":0,"id":52,"state_changed_at":1347490579,"assignment_type":"review","description":"I
- need to clean my house","city":{"links":{"get":"/api/v1/cities/3"},"lat":37.77493,"id":1053,"lng":-122.419416,"name":"SF
- Bay Area"},"assign_by_time":1347577200,"name":"House Cleaning","offers":{"items":[{"charge_price":26,"id":7,"runner":{"links":{"get":"/api/v1/users/32","avatar_url":"http://s-app1.taskrabbit.com/images/default_avatars/runner_thumb.png"},"friend_code_url":"http://taskrabbit.com/PAL/32","id":32,"short_name":"Fancy","display_name":"Fancy
- R.","runner":true,"runner_level":1,"city":{"links":{"get":"/api/v1/cities/4"},"lat":40.714353,"id":1060,"lng":-74.005973,"name":"New
- York City"},"email":"fancyrabbit@example.com","full_name":"Fancy R."},"state":"sent"}]},"location_visits":{"items":[{"lat":37.7867363,"zip":"94102","id":11,"complete":"213
- Powell Street, San Francisco, CA, San Francisco, CA 94102","partial":"Powell
- Street, San Francisco, CA, San Francisco, CA 94102","location_id":52,"lng":-122.4080542,"city":"San
- Francisco","name":"Home","approximate_radius":0,"address":"213 Powell Street,
- San Francisco, CA","state":"CA"}]},"state_label":"posted","complete_by_time":1347663600,"state":"opened"}'
- http_version: '1.1'
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
uri: https://taskrabbitdev.com:443/api/v1/tasks/52?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
headers:
x-client-application:
- - <API_SECRET>
+ - ''
authorization:
- OAuth <USER_WITH_CARD>
response: !ruby/struct:VCR::Response
@@ -62,15 +17,15 @@
server:
- nginx/1.0.11
date:
- - Thu, 13 Sep 2012 00:30:49 GMT
+ - Thu, 13 Sep 2012 00:52:45 GMT
content-type:
- application/json; charset=utf-8
status:
- 200 OK
set-cookie:
- - current_geo=1053; path=/; expires=Tue, 13-Nov-2012 01:30:49 GMT
+ - current_geo=1053; path=/; expires=Tue, 13-Nov-2012 01:52:45 GMT
x-runtime:
- - '0.192928'
+ - '0.186363'
content-length:
- '1245'
etag:
@@ -81,7 +36,7 @@
- max-age=0, private, must-revalidate
body: ! '{"private_runner":false,"links":{"put":"/api/v1/tasks/52","html":"http://s-app1.taskrabbit.com/tasks/house-cleaning-7091","get":"/api/v1/tasks/52","offers":"/api/v1/tasks/52/offers","authenticated":"http://s-app1.taskrabbit.com/go/82d359e524666a2d8b96f6df1fbfcad4a720a0b4fed8c3f0985139a13a4d6433b65f7f05e80360af131d8f9638f8307e035b","delete":"/api/v1/tasks/52"},"charge_price":0,"runners":{"items":[]},"cost_in_cents":0,"id":52,"state_changed_at":1347490579,"assignment_type":"review","description":"I
need to clean my house","city":{"links":{"get":"/api/v1/cities/3"},"lat":37.77493,"id":1053,"lng":-122.419416,"name":"SF
- Bay Area"},"assign_by_time":1347577200,"name":"House Cleaning","offers":{"items":[{"charge_price":26,"id":7,"created_at":1347493865,"comments":"I
+ Bay Area"},"assign_by_time":1347577200,"name":"House Cleaning","offers":{"items":[{"charge_price":26, "runner_id": 31, "id":7,"created_at":1347493865,"comments":"I
clean a lot!","state":"sent"}]},"location_visits":{"items":[{"lat":37.7867363,"zip":"94102","id":11,"complete":"213
Powell Street, San Francisco, CA, San Francisco, CA 94102","partial":"Powell
Street, San Francisco, CA, San Francisco, CA 94102","location_id":52,"lng":-122.4080542,"city":"San
@@ -1,30 +1,34 @@
----
-- !ruby/struct:VCR::HTTPInteraction
- request: !ruby/struct:VCR::Request
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
method: :get
- uri: https://taskrabbitdev.com/api/v1/tasks?
+ uri: https://taskrabbitdev.com:443/api/v1/tasks?include[task][]=errors&include[task][]=links&include[task][]=error&include[task][]=id&include[task][]=name&include[task][]=user&include[task][]=runner&include[task][]=runners&include[task][]=named_price&include[task][]=charge_price&include[task][]=cost_in_cents&include[task][]=number_runners_to_fill&include[task][]=state_label&include[task][]=city_id&include[task][]=city&include[task][]=description&include[task][]=private_description&include[task][]=private_runner&include[task][]=virtual&include[task][]=state&include[task][]=assignment_type&include[task][]=complete_by_time&include[task][]=state_changed_at&include[task][]=assign_by_time&include[task][]=location_visits&include[task][]=offers&include[task][]=other_locations_attributes&include[task][]=uploaded_photos_attributes&include[task][]=uploaded_sounds_attributes
body:
- headers:
- x-client-application:
- - ""
- authorization:
+ headers:
+ x-client-application:
+ - ''
+ authorization:
- OAuth
- response: !ruby/struct:VCR::Response
- status: !ruby/struct:VCR::ResponseStatus
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
code: 403
message: Forbidden
- headers:
- content-type:
+ headers:
+ server:
+ - nginx/1.0.11
+ date:
+ - Thu, 13 Sep 2012 00:54:52 GMT
+ content-type:
- application/json; charset=utf-8
- x-runtime:
- - "628"
- server:
- - WEBrick/1.3.1 (Ruby/1.8.7/2010-04-19)
- date:
- - Wed, 02 Nov 2011 02:35:53 GMT
- content-length:
- - "44"
- cache-control:
+ status:
+ - 403 Forbidden
+ x-runtime:
+ - '0.021289'
+ content-length:
+ - '44'
+ x-ua-compatible:
+ - IE=Edge,chrome=1
+ cache-control:
- no-cache
- body: "{\"error\":\"Missing valid client application\"}"
- http_version: "1.1"
+ body: ! '{"error":"Missing valid client application"}'
+ http_version: '1.1'
Oops, something went wrong.

0 comments on commit f11ec2f

Please sign in to comment.