taskrabbit 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.env.example +15 -0
  2. data/.gitignore +1 -0
  3. data/.rvmrc +1 -1
  4. data/CHANGELOG.md +4 -0
  5. data/Gemfile +2 -0
  6. data/lib/taskrabbit.rb +1 -0
  7. data/lib/taskrabbit/api.rb +1 -0
  8. data/lib/taskrabbit/offer.rb +15 -0
  9. data/lib/taskrabbit/smash.rb +17 -2
  10. data/lib/taskrabbit/task.rb +11 -1
  11. data/lib/taskrabbit/version.rb +1 -1
  12. data/spec/spec_helper.rb +8 -4
  13. data/spec/support/cassettes/account/no_user.yml +2 -2
  14. data/spec/support/cassettes/account/properties.yml +46 -27
  15. data/spec/support/cassettes/account/tasks.yml +10 -10
  16. data/spec/support/cassettes/account/with_user.yml +5 -5
  17. data/spec/support/cassettes/cities/all.yml +2 -2
  18. data/spec/support/cassettes/cities/find.yml +2 -2
  19. data/spec/support/cassettes/cities/properties.yml +2 -2
  20. data/spec/support/cassettes/errors/404.yml +28 -356
  21. data/spec/support/cassettes/locations/properties.yml +8 -8
  22. data/spec/support/cassettes/tasks/all.yml +2 -2
  23. data/spec/support/cassettes/tasks/create/default.yml +3 -3
  24. data/spec/support/cassettes/tasks/create/using_account.yml +3 -3
  25. data/spec/support/cassettes/tasks/create/with_invalid_params.yml +3 -3
  26. data/spec/support/cassettes/tasks/create/with_location.yml +3 -3
  27. data/spec/support/cassettes/tasks/create/with_times.yml +45 -0
  28. data/spec/support/cassettes/tasks/create/without_credit_card.yml +2 -2
  29. data/spec/support/cassettes/tasks/create/without_user.yml +2 -2
  30. data/spec/support/cassettes/tasks/delete.yml +6 -6
  31. data/spec/support/cassettes/tasks/find.yml +41 -26
  32. data/spec/support/cassettes/tasks/properties.yml +41 -26
  33. data/spec/support/cassettes/tasks/save.yml +6 -6
  34. data/spec/support/cassettes/tasks/update.yml +6 -6
  35. data/spec/support/cassettes/tasks/with_offers_properties.yml +45 -0
  36. data/spec/support/cassettes/tasks/without_client.yml +27 -23
  37. data/spec/support/cassettes/users/find.yml +61 -23
  38. data/spec/support/cassettes/users/properties.yml +35 -27
  39. data/spec/support/cassettes/users/tasks/all.yml +42 -27
  40. data/spec/taskrabbit/account_spec.rb +10 -10
  41. data/spec/taskrabbit/api_spec.rb +1 -1
  42. data/spec/taskrabbit/city_spec.rb +3 -3
  43. data/spec/taskrabbit/location_spec.rb +1 -1
  44. data/spec/taskrabbit/offer_spec.rb +23 -0
  45. data/spec/taskrabbit/smash_spec.rb +19 -0
  46. data/spec/taskrabbit/task_spec.rb +36 -22
  47. data/spec/taskrabbit/user_spec.rb +10 -10
  48. metadata +11 -3
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://localhost:3000/api/v1/account?
5
+ uri: https://taskrabbitdev.com/api/v1/account?
6
6
  body:
7
7
  headers:
8
- x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
10
- authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
8
+ x-client-application:
9
+ - <API_SECRET>
10
+ authorization:
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
@@ -33,13 +33,13 @@
33
33
  - !ruby/struct:VCR::HTTPInteraction
34
34
  request: !ruby/struct:VCR::Request
35
35
  method: :get
36
- uri: http://localhost:3000/api/v1/users/49720/locations?
36
+ uri: https://taskrabbitdev.com/api/v1/users/49720/locations?
37
37
  body:
38
38
  headers:
39
39
  x-client-application:
40
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
40
+ - <API_SECRET>
41
41
  authorization:
42
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
42
+ - OAuth <USER_WITH_CARD>
43
43
  response: !ruby/struct:VCR::Response
44
44
  status: !ruby/struct:VCR::ResponseStatus
45
45
  code: 200
@@ -2,11 +2,11 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ 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
6
6
  body:
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
11
  - OAuth
12
12
  response: !ruby/struct:VCR::Response
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 201
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 422
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body:
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 422
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4&task[other_locations_attributes][][city]=Boston&task[other_locations_attributes][][address]=123%20Main%20St&task[other_locations_attributes][][name]=Home&task[other_locations_attributes][][zip]=02154&task[other_locations_attributes][][lng]=-71.059774&task[other_locations_attributes][][lat]=42.358432&task[other_locations_attributes][][state]=MA&task[other_locations_attributes][][name]=Middle%20of%20the%20park&task[other_locations_attributes][][lng]=-71.059772&task[other_locations_attributes][][lat]=42.358430
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
@@ -0,0 +1,45 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://taskrabbitdev.com:443/api/v1/tasks?
6
+ body: task[description]=&task[private_description]=&task[private_runner]=false&task[virtual]=false&task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4&task[complete_by_time]=1702411800&task[assign_by_time]=1701465000
7
+ headers:
8
+ x-client-application:
9
+ - <API_SECRET>
10
+ authorization:
11
+ - OAuth <USER_WITH_CARD>
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ server:
18
+ - nginx/1.0.11
19
+ date:
20
+ - Wed, 10 Oct 2012 05:38:58 GMT
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ status:
24
+ - 200 OK
25
+ etag:
26
+ - ! '"2a1d2e4369a81524428d843953cb1484"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - current_geo=1053; path=/; expires=Mon, 10-Dec-2012 06:38:58 GMT; secure
31
+ x-runtime:
32
+ - '0.532811'
33
+ x-ua-compatible:
34
+ - IE=Edge,chrome=1
35
+ strict-transport-security:
36
+ - max-age=31536000
37
+ content-length:
38
+ - '1040'
39
+ body: ! '{"charge_price":20,"id":132,"named_price":20,"runners":{"items":[]},"cost_in_cents":0,"assign_by_time":1701465000,"assignment_type":"auto","description_properties":[{"value":"","title":"Description","key":"description"},{"value":"","title":"Private
40
+ description","key":"private_description"},{"value":1701465000,"title":"If unassigned,
41
+ Task will expire on","key":"assign_by_time"},{"value":1702411800,"title":"Task
42
+ should be completed by","key":"complete_by_time"}],"state_label":"posted","city":{"id":1060,"lng":-74.005973,"lat":40.714353,"name":"New
43
+ York City","links":{"get":"/api/v1/cities/4"}},"state_changed_at":1349847538,"name":"My
44
+ First Task","state":"opened","private_runner":false,"complete_by_time":1702411800,"runner_fee":0,"links":{"put":"/api/v1/tasks/132","html":"http://s-app1.taskrabbit.com/tasks/my-first-task--15","get":"/api/v1/tasks/132","authenticated":"http://s-app1.taskrabbit.com/go/f628a10b1384beb11bd617706d93ecec821e47520a27c9cd0b71f64399e289ec3d66c5d247d6248768f2a5fb47a7267e7360","delete":"/api/v1/tasks/132"}}'
45
+ http_version: '1.1'
@@ -2,11 +2,11 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
11
  - OAuth sjCuNHsxMRkFiJGpLWZzYJksDjfnXtDvDcPuuDkn
12
12
  response: !ruby/struct:VCR::Response
@@ -2,11 +2,11 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
11
  - OAuth
12
12
  response: !ruby/struct:VCR::Response
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
@@ -33,13 +33,13 @@
33
33
  - !ruby/struct:VCR::HTTPInteraction
34
34
  request: !ruby/struct:VCR::Request
35
35
  method: :delete
36
- uri: http://localhost:3000/api/v1/tasks/22678?
36
+ uri: https://taskrabbitdev.com/api/v1/tasks/22678?
37
37
  body:
38
38
  headers:
39
39
  x-client-application:
40
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
40
+ - <API_SECRET>
41
41
  authorization:
42
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
42
+ - OAuth <USER_WITH_CARD>
43
43
  response: !ruby/struct:VCR::Response
44
44
  status: !ruby/struct:VCR::ResponseStatus
45
45
  code: 200
@@ -1,32 +1,47 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://localhost:3000/api/v1/tasks/22545?
5
+ 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
6
6
  body:
7
- headers:
8
- x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
10
- authorization:
7
+ headers:
8
+ x-client-application:
9
+ - <API_SECRET>
10
+ authorization:
11
11
  - OAuth
12
- response: !ruby/struct:VCR::Response
13
- status: !ruby/struct:VCR::ResponseStatus
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
15
15
  message: OK
16
- headers:
17
- etag:
18
- - "\"1abb040c2b73a76e1261969893a363f8\""
19
- content-type:
16
+ headers:
17
+ server:
18
+ - nginx/1.0.11
19
+ date:
20
+ - Wed, 12 Sep 2012 23:03:41 GMT
21
+ content-type:
20
22
  - application/json; charset=utf-8
21
- x-runtime:
22
- - "752"
23
- server:
24
- - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
- date:
26
- - Sat, 17 Mar 2012 23:12:39 GMT
27
- content-length:
28
- - "774"
29
- cache-control:
30
- - private, max-age=0, must-revalidate
31
- 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\"}"
32
- http_version: "1.1"
23
+ status:
24
+ - 200 OK
25
+ x-runtime:
26
+ - '0.128537'
27
+ content-length:
28
+ - '1417'
29
+ etag:
30
+ - ! '"1f50fdd2204ea47e6340962b9a4e95b5"'
31
+ x-ua-compatible:
32
+ - IE=Edge,chrome=1
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ body: ! '{"links":{"html":"http://s-app1.taskrabbit.com/tasks/house-cleaning-7091","get":"/api/v1/tasks/52"},"runners":{"items":[]},"user":{"links":{"get":"/api/v1/users/40","avatar_url":"http://s-app1.taskrabbit.com/images/default_avatars/poster_thumb.png"},"friend_code_url":"http://taskrabbit.com/PAL/40","id":40,"short_name":"UserWith","display_name":"UserWith
36
+ c.","city":{"lat":37.77493,"links":{"get":"/api/v1/cities/3"},"id":1053,"name":"SF
37
+ Bay Area","lng":-122.419416},"full_name":"UserWith c."},"cost_in_cents":0,"id":52,"state_changed_at":1347490579,"description":"I
38
+ need to clean my house","city":{"links":{"get":"/api/v1/cities/3"},"lat":37.77493,"id":1053,"lng":-122.419416,"name":"SF
39
+ Bay Area"},"assign_by_time":1347577200,"name":"House Cleaning","state_label":"posted","complete_by_time":1347663600,"description_properties":[{"value":"I
40
+ need to clean my house","key":"description","title":"Description"},{"value":"Regular
41
+ Maintenance","key":"task_field_16","title":"Level of cleaning"},{"value":"Multiple
42
+ Rooms, 1 Bathroom","key":"task_field_17","title":"Size of house"},{"value":"Cleaning
43
+ supplies are already in the house","key":"task_field_18","title":"Do you have
44
+ all the necessary cleaning supplies at your house"},{"value":1347577200,"key":"assign_by_time","title":"If
45
+ unassigned, Task will expire on"},{"value":1347663600,"key":"complete_by_time","title":"Task
46
+ should be completed by"}],"state":"opened"}'
47
+ http_version: '1.1'
@@ -1,32 +1,47 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :get
5
- uri: http://localhost:3000/api/v1/tasks/22545?
5
+ 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
6
6
  body:
7
- headers:
8
- x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
10
- authorization:
7
+ headers:
8
+ x-client-application:
9
+ - <API_SECRET>
10
+ authorization:
11
11
  - OAuth
12
- response: !ruby/struct:VCR::Response
13
- status: !ruby/struct:VCR::ResponseStatus
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
15
15
  message: OK
16
- headers:
17
- etag:
18
- - "\"d7e8594808d34c7e4e8d87737f8ec5dc\""
19
- content-type:
16
+ headers:
17
+ server:
18
+ - nginx/1.0.11
19
+ date:
20
+ - Wed, 12 Sep 2012 23:03:40 GMT
21
+ content-type:
20
22
  - application/json; charset=utf-8
21
- x-runtime:
22
- - "726"
23
- server:
24
- - WEBrick/1.3.1 (Ruby/1.8.7/2011-02-18)
25
- date:
26
- - Sat, 17 Mar 2012 23:31:20 GMT
27
- content-length:
28
- - "1432"
29
- cache-control:
30
- - private, max-age=0, must-revalidate
31
- 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\"}"
32
- http_version: "1.1"
23
+ status:
24
+ - 200 OK
25
+ x-runtime:
26
+ - '0.152650'
27
+ content-length:
28
+ - '1417'
29
+ etag:
30
+ - ! '"1f50fdd2204ea47e6340962b9a4e95b5"'
31
+ x-ua-compatible:
32
+ - IE=Edge,chrome=1
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ body: ! '{"links":{"html":"http://s-app1.taskrabbit.com/tasks/house-cleaning-7091","get":"/api/v1/tasks/52"},"runners":{"items":[]},"user":{"links":{"get":"/api/v1/users/40","avatar_url":"http://s-app1.taskrabbit.com/images/default_avatars/poster_thumb.png"},"friend_code_url":"http://taskrabbit.com/PAL/40","id":40,"short_name":"UserWith","display_name":"UserWith
36
+ c.","city":{"lat":37.77493,"links":{"get":"/api/v1/cities/3"},"id":1053,"name":"SF
37
+ Bay Area","lng":-122.419416},"full_name":"UserWith c."},"cost_in_cents":0,"id":52,"state_changed_at":1347490579,"description":"I
38
+ need to clean my house","city":{"links":{"get":"/api/v1/cities/3"},"lat":37.77493,"id":1053,"lng":-122.419416,"name":"SF
39
+ Bay Area"},"assign_by_time":1347577200,"name":"House Cleaning","state_label":"posted","complete_by_time":1347663600,"description_properties":[{"value":"I
40
+ need to clean my house","key":"description","title":"Description"},{"value":"Regular
41
+ Maintenance","key":"task_field_16","title":"Level of cleaning"},{"value":"Multiple
42
+ Rooms, 1 Bathroom","key":"task_field_17","title":"Size of house"},{"value":"Cleaning
43
+ supplies are already in the house","key":"task_field_18","title":"Do you have
44
+ all the necessary cleaning supplies at your house"},{"value":1347577200,"key":"assign_by_time","title":"If
45
+ unassigned, Task will expire on"},{"value":1347663600,"key":"complete_by_time","title":"Task
46
+ should be completed by"}],"state":"opened"}'
47
+ http_version: '1.1'
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
@@ -33,13 +33,13 @@
33
33
  - !ruby/struct:VCR::HTTPInteraction
34
34
  request: !ruby/struct:VCR::Request
35
35
  method: :get
36
- uri: http://localhost:3000/api/v1/tasks/22679?
36
+ 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
37
37
  body:
38
38
  headers:
39
39
  x-client-application:
40
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
40
+ - <API_SECRET>
41
41
  authorization:
42
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
42
+ - OAuth <USER_WITH_CARD>
43
43
  response: !ruby/struct:VCR::Response
44
44
  status: !ruby/struct:VCR::ResponseStatus
45
45
  code: 200
@@ -2,13 +2,13 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://localhost:3000/api/v1/tasks?
5
+ uri: https://taskrabbitdev.com/api/v1/tasks?
6
6
  body: task[name]=My%20First%20Task&task[named_price]=20&task[city_id]=4
7
7
  headers:
8
8
  x-client-application:
9
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
9
+ - <API_SECRET>
10
10
  authorization:
11
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
11
+ - OAuth <USER_WITH_CARD>
12
12
  response: !ruby/struct:VCR::Response
13
13
  status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
@@ -33,13 +33,13 @@
33
33
  - !ruby/struct:VCR::HTTPInteraction
34
34
  request: !ruby/struct:VCR::Request
35
35
  method: :put
36
- uri: http://localhost:3000/api/v1/tasks/22680?
36
+ uri: https://taskrabbitdev.com/api/v1/tasks/22680?
37
37
  body: name=New%20Name&id=22680
38
38
  headers:
39
39
  x-client-application:
40
- - euqmQpzV04GmN1dJTY639PdI7eiSjCjI3lKTkPWn
40
+ - <API_SECRET>
41
41
  authorization:
42
- - OAuth RhyRtRg1bRNyqmdozkY6JJJ3eGDpoRGTm9AXUudp
42
+ - OAuth <USER_WITH_CARD>
43
43
  response: !ruby/struct:VCR::Response
44
44
  status: !ruby/struct:VCR::ResponseStatus
45
45
  code: 200