snafu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +4 -0
  3. data/Guardfile +10 -0
  4. data/LICENSE +7 -0
  5. data/README.textile +65 -0
  6. data/Rakefile +6 -0
  7. data/lib/snafu.rb +6 -0
  8. data/lib/snafu/client.rb +68 -0
  9. data/lib/snafu/locations.rb +32 -0
  10. data/lib/snafu/models.rb +4 -0
  11. data/lib/snafu/models/glitch_image.rb +17 -0
  12. data/lib/snafu/models/hub.rb +32 -0
  13. data/lib/snafu/models/location.rb +17 -0
  14. data/lib/snafu/models/street.rb +41 -0
  15. data/lib/snafu/version.rb +3 -0
  16. data/snafu.gemspec +31 -0
  17. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_accept_a_hash_of_POST_arguments.yml +39 -0
  18. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if.yml +36 -0
  19. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate.yml +36 -0
  20. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_authenticate_called_with_true.yml +36 -0
  21. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate.yml +36 -0
  22. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_authenticate_true.yml +36 -0
  23. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_automatically_pass_in_the_oauth_token_if_called_with_true.yml +36 -0
  24. data/spec/fixtures/vcr_cassettes/Snafu_Client/call_should_raise_a_GlitchAPIError_if_receiving_an_unsucessful_response_from_the_Glitch_API.yml +36 -0
  25. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hub_should_return_a_valid_hub_if_given_a_valid_Hub_ID.yml +39 -0
  26. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_populated_the_returned_Hub_objects_with_an_id_and_name.yml +39 -0
  27. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_Hub_objects.yml +39 -0
  28. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_hubs_should_return_an_array_of_all_hubs.yml +39 -0
  29. data/spec/fixtures/vcr_cassettes/Snafu_Locations/get_street_should_return_a_complete_street_if_given_a_valid_street_ID.yml +40 -0
  30. data/spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml +39 -0
  31. data/spec/fixtures/vcr_cassettes/Snafu_Models_Hub/initialize_should_populate_values_if_given_the_raw_response_from_Glitch.yml +39 -0
  32. data/spec/fixtures/vcr_cassettes/Snafu_Models_Street/initialize_should_populate_values_if_given_the_raw_JSON_response_from_HTTParty.yml +40 -0
  33. data/spec/fixtures/vcr_cassettes/calendar_getHoldays/valid_calendar.yml +39 -0
  34. data/spec/snafu/client_spec.rb +41 -0
  35. data/spec/snafu/locations_spec.rb +55 -0
  36. data/spec/snafu/models/glitch_image_spec.rb +36 -0
  37. data/spec/snafu/models/hub_spec.rb +43 -0
  38. data/spec/snafu/models/street_spec.rb +81 -0
  39. data/spec/snafu/models_spec.rb +9 -0
  40. data/spec/snafu_spec.rb +14 -0
  41. data/spec/spec_helper.rb +28 -0
  42. metadata +179 -0
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/players.stats?oauth_token=dj0xJmk9Mjg3MzgmYz03NDZmMDYyM2M1ODQ4YmVjMGY2OWZhOTY1YWM0NTZhMw
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Fri, 02 Dec 2011 02:48:16 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C65A13E6B150AA38A20996585FE1291DCF151568D701ED5E98FEE24FF052B412CF84A57C93B1B6B2555103165F28F773;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '113'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"level":13,"xp":60,"xp_max":7032,"currants":2541,"energy":298,"energy_max":300,"mood":295,"mood_max":300}'
36
+ http_version: '1.1'
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/players.stats?oauth_token=dj0xJmk9Mjg3MzgmYz03NDZmMDYyM2M1ODQ4YmVjMGY2OWZhOTY1YWM0NTZhMw
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Fri, 02 Dec 2011 02:48:27 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C65A13E6B150AA38A20996585FE1291DCF151568D701ED5E98FEE24FF052B412CF84A57C93B1B6B2555103165F28F773;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '113'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"level":13,"xp":60,"xp_max":7032,"currants":2541,"energy":298,"energy_max":300,"mood":295,"mood_max":300}'
36
+ http_version: '1.1'
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/players.stats?oauth_token=dj0xJmk9Mjg3MzgmYz03NDZmMDYyM2M1ODQ4YmVjMGY2OWZhOTY1YWM0NTZhMw
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Fri, 02 Dec 2011 02:48:47 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7B8FD96C58B401C3F3584E3DD5A789139D245B7D2205272CFBFFB3C3AC28CFB84FD157576285C68AFF419B0FB405C0DC5;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '113'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"level":13,"xp":60,"xp_max":7032,"currants":2541,"energy":298,"energy_max":300,"mood":295,"mood_max":300}'
36
+ http_version: '1.1'
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/players.status?oauth_token=cD01MzkxOCZzYz1pZGVudGl0eSZ0PTEzMjI3NjIyMTUmdT01Mzk5NSZoPWMwZjFkNWM1YmIyMWZlMTE
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Fri, 02 Dec 2011 01:57:53 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7B8FD96C58B401C3F3584E3DD5A789139D245B7D2205272CFBFFB3C3AC28CFB84FD157576285C68AFF419B0FB405C0DC5;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '35'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":0,"error":"method not found"}'
36
+ http_version: '1.1'
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/players.stats?oauth_token=dj0xJmk9Mjg3MzgmYz03NDZmMDYyM2M1ODQ4YmVjMGY2OWZhOTY1YWM0NTZhMw
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Fri, 02 Dec 2011 02:47:56 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C65A13E6B150AA38A20996585FE1291DFEAD0D0B4040C059574EBB54E6530F35596717BED4B680B2E15243031043DF41;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '113'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"level":13,"xp":60,"xp_max":7032,"currants":2541,"energy":298,"energy_max":300,"mood":295,"mood_max":300}'
36
+ http_version: '1.1'
@@ -0,0 +1,36 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/badmethod
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:34:58 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE4098DC7B1C7896C3495C0321477EE3FFB6D062BCC604E27B432E4350AD26F2A097D;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '35'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":0,"error":"method not found"}'
36
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.getStreets?hub_id=27
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:35:04 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE4098DC7B1C7896C3495C0321477EE3FFB6D062BCC604E27B432E4350AD26F2A097D;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '329'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"hub_id":"27","name":"Ix","streets":{"LM416LNIKVLM1":{"name":"Baby
36
+ Steppes"},"LM413SQ6LRN58":{"name":"East Spice"},"LM410QQ0CHARO":{"name":"Flipside"},"LM4115NJ46G8M":{"name":"Groddle
37
+ Ladder"},"LM4109NI2R640":{"name":"Guillermo Gamera Way"},"LM410TMR0S2S1":{"name":"Ruta
38
+ Asuncion"},"LM413RQ6LRG9N":{"name":"West Spice"}}}'
39
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.getHubs
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:35:03 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE40943A67B18C55CD05576680FE8CB8ED1442E532BB1DB467DE7995571EE672126B5;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '678'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"hubs":{"27":{"name":"Ix"},"50":{"name":"Ilmenskie Caverns"},"51":{"name":"Uralia"},"56":{"name":"Groddle
36
+ Forest"},"58":{"name":"Groddle Meadow"},"63":{"name":"Shimla Mirch"},"64":{"name":"Groddle
37
+ Heights"},"71":{"name":"Jethimadh"},"72":{"name":"Chakra Phool"},"75":{"name":"Bortola"},"76":{"name":"Alakol"},"78":{"name":"Ilmenskie
38
+ Deeps"},"85":{"name":"Kajuu"},"86":{"name":"Baqala"},"89":{"name":"Andra"},"90":{"name":"Choru"},"91":{"name":"Zhambu"},"92":{"name":"Tamila"},"93":{"name":"Salatu"},"95":{"name":"Xalanga"},"97":{"name":"Muufo"},"98":{"name":"Besara"},"99":{"name":"Kalavana"},"101":{"name":"Aranna"},"106":{"name":"Pollokoo"},"107":{"name":"Callopee"}}}'
39
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.getHubs
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:35:02 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE4098DC7B1C7896C3495C0321477EE3FFB6D062BCC604E27B432E4350AD26F2A097D;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '678'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"hubs":{"27":{"name":"Ix"},"50":{"name":"Ilmenskie Caverns"},"51":{"name":"Uralia"},"56":{"name":"Groddle
36
+ Forest"},"58":{"name":"Groddle Meadow"},"63":{"name":"Shimla Mirch"},"64":{"name":"Groddle
37
+ Heights"},"71":{"name":"Jethimadh"},"72":{"name":"Chakra Phool"},"75":{"name":"Bortola"},"76":{"name":"Alakol"},"78":{"name":"Ilmenskie
38
+ Deeps"},"85":{"name":"Kajuu"},"86":{"name":"Baqala"},"89":{"name":"Andra"},"90":{"name":"Choru"},"91":{"name":"Zhambu"},"92":{"name":"Tamila"},"93":{"name":"Salatu"},"95":{"name":"Xalanga"},"97":{"name":"Muufo"},"98":{"name":"Besara"},"99":{"name":"Kalavana"},"101":{"name":"Aranna"},"106":{"name":"Pollokoo"},"107":{"name":"Callopee"}}}'
39
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.getHubs
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:35:00 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB744B8EE156EEC745EF275A9089C697163F6DA6B492CB3CBE399C5977DF92D1F3093BD75659503606D3AB37D325E15FFCF;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '678'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"hubs":{"27":{"name":"Ix"},"50":{"name":"Ilmenskie Caverns"},"51":{"name":"Uralia"},"56":{"name":"Groddle
36
+ Forest"},"58":{"name":"Groddle Meadow"},"63":{"name":"Shimla Mirch"},"64":{"name":"Groddle
37
+ Heights"},"71":{"name":"Jethimadh"},"72":{"name":"Chakra Phool"},"75":{"name":"Bortola"},"76":{"name":"Alakol"},"78":{"name":"Ilmenskie
38
+ Deeps"},"85":{"name":"Kajuu"},"86":{"name":"Baqala"},"89":{"name":"Andra"},"90":{"name":"Choru"},"91":{"name":"Zhambu"},"92":{"name":"Tamila"},"93":{"name":"Salatu"},"95":{"name":"Xalanga"},"97":{"name":"Muufo"},"98":{"name":"Besara"},"99":{"name":"Kalavana"},"101":{"name":"Aranna"},"106":{"name":"Pollokoo"},"107":{"name":"Callopee"}}}'
39
+ http_version: '1.1'
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.streetInfo?street_tsid=LM416LNIKVLM1
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:35:05 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE40943A67B18C55CD05576680FE8CB8ED1442E532BB1DB467DE7995571EE672126B5;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '685'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"tsid":"LM416LNIKVLM1","name":"Baby Steppes","hub":{"id":27,"name":"Ix"},"mote":{"id":9,"name":"Ur"},"active_project":false,"features":["<b>5
36
+ Piggies<\/b>, <b>2 Butterflies<\/b>, <b>9 Chickens<\/b>, <b>5 Spice Plants<\/b>,
37
+ and <b>1 Gas Plant<\/b>."],"connections":{"LM4115NJ46G8M":{"name":"Groddle Ladder","hub":{"id":27,"name":"Ix"},"mote":{"id":9,"name":"Ur"}},"LM410TMR0S2S1":{"name":"Ruta
38
+ Asuncion","hub":{"id":27,"name":"Ix"},"mote":{"id":9,"name":"Ur"}},"LM4109NI2R640":{"name":"Guillermo
39
+ Gamera Way","hub":{"id":27,"name":"Ix"},"mote":{"id":9,"name":"Ur"}}},"image":{"url":"http:\/\/c2.glitch.bz\/streets\/2011-11-27\/LM416LNIKVLM1_main_1322382945.jpg","w":720,"h":120}}'
40
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.glitch.com:80/simple/locations.getStreets?hub_id=27
6
+ body: !!null
7
+ headers: !!null
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ access-control-allow-credentials:
14
+ - 'false'
15
+ access-control-allow-methods:
16
+ - POST, GET, OPTIONS
17
+ access-control-allow-origin:
18
+ - ! '*'
19
+ access-control-max-age:
20
+ - '1728000'
21
+ cache-control:
22
+ - no-cache="set-cookie"
23
+ content-type:
24
+ - text/plain; charset=utf-8
25
+ date:
26
+ - Thu, 01 Dec 2011 01:51:35 GMT
27
+ server:
28
+ - Apache/2.2.17
29
+ set-cookie:
30
+ - AWSELB=F7715B6B10BD5947A6E9DAE19D6F6DD7D91A271FB7C136A73584C8A9C7D99844891B9CE40943A67B18C55CD05576680FE8CB8ED1442E532BB1DB467DE7995571EE672126B5;PATH=/;MAX-AGE=600
31
+ content-length:
32
+ - '329'
33
+ connection:
34
+ - Close
35
+ body: ! '{"ok":1,"hub_id":"27","name":"Ix","streets":{"LM416LNIKVLM1":{"name":"Baby
36
+ Steppes"},"LM413SQ6LRN58":{"name":"East Spice"},"LM410QQ0CHARO":{"name":"Flipside"},"LM4115NJ46G8M":{"name":"Groddle
37
+ Ladder"},"LM4109NI2R640":{"name":"Guillermo Gamera Way"},"LM410TMR0S2S1":{"name":"Ruta
38
+ Asuncion"},"LM413RQ6LRG9N":{"name":"West Spice"}}}'
39
+ http_version: '1.1'