weather-api 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -1
  3. data/Gemfile +1 -7
  4. data/README.md +3 -4
  5. data/Rakefile +1 -1
  6. data/lib/weather-api.rb +47 -25
  7. data/lib/weather-api/astronomy.rb +3 -3
  8. data/lib/weather-api/atmosphere.rb +4 -4
  9. data/lib/weather-api/condition.rb +5 -5
  10. data/lib/weather-api/forecast.rb +7 -7
  11. data/lib/weather-api/image.rb +2 -18
  12. data/lib/weather-api/location.rb +4 -4
  13. data/lib/weather-api/response.rb +14 -18
  14. data/lib/weather-api/units.rb +5 -5
  15. data/lib/weather-api/utils.rb +3 -3
  16. data/lib/weather-api/version.rb +2 -2
  17. data/lib/weather-api/wind.rb +4 -4
  18. data/spec/fixtures/cassettes/Weather_Astronomy/should_contain_Time_objects_for_sunrise_and_sunset.yml +62 -0
  19. data/spec/fixtures/cassettes/Weather_Atmosphere/should_contain_a_float_indicating_atmospheric_pressure.yml +62 -0
  20. data/spec/fixtures/cassettes/Weather_Atmosphere/should_contain_a_string_indicating_barometric_pressure.yml +62 -0
  21. data/spec/fixtures/cassettes/Weather_Atmosphere/should_contain_integers_representing_humidity_and_visibility.yml +62 -0
  22. data/spec/fixtures/cassettes/Weather_Condition/should_contain_a_weather_condition_code_a_date_a_temperature_and_a_description.yml +62 -0
  23. data/spec/fixtures/cassettes/Weather_Forecast/should_contain_high_and_low_forecasts.yml +62 -0
  24. data/spec/fixtures/cassettes/Weather_Forecast/should_contain_the_name_of_the_day_associated_with_the_forecast.yml +62 -0
  25. data/spec/fixtures/cassettes/Weather_Forecast/should_have_a_brief_description_of_the_forecasted_conditions.yml +62 -0
  26. data/spec/fixtures/cassettes/Weather_Forecast/should_have_a_weather_condition_code.yml +62 -0
  27. data/spec/fixtures/cassettes/Weather_Forecast/should_have_an_associated_date.yml +62 -0
  28. data/spec/fixtures/cassettes/Weather_Image/should_contain_a_string_for_the_image_url.yml +62 -0
  29. data/spec/fixtures/cassettes/Weather_Location/should_be_able_to_look_up_Nice_France.yml +62 -0
  30. data/spec/fixtures/cassettes/Weather_Location/should_be_able_to_look_up_Seattle_WA.yml +62 -0
  31. data/spec/fixtures/cassettes/Weather_Location/should_be_able_to_look_up_Victoria_BC.yml +62 -0
  32. data/spec/fixtures/cassettes/Weather_Location/should_contain_city_country_and_region_as_strings.yml +62 -0
  33. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_HTML_description_summarizing_weather_conditions.yml +62 -0
  34. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_String_title.yml +62 -0
  35. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Astronomy_object.yml +62 -0
  36. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Atmosphere_object.yml +62 -0
  37. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Condition_object.yml +62 -0
  38. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Image_object.yml +62 -0
  39. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Location_object.yml +62 -0
  40. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Units_object.yml +62 -0
  41. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_Weather_Wind_object.yml +62 -0
  42. data/spec/fixtures/cassettes/Weather_Response/should_contain_a_collection_of_Weather_Forecast_objects.yml +62 -0
  43. data/spec/fixtures/cassettes/Weather_Response/should_contain_latitude_and_longitude_in_floats.yml +62 -0
  44. data/spec/fixtures/cassettes/Weather_Response/should_contain_the_WOEID_of_the_request_location_and_the_requested_URL.yml +62 -0
  45. data/spec/fixtures/cassettes/Weather_Units/defaults/should_default_to_imperial_units.yml +62 -0
  46. data/spec/fixtures/cassettes/Weather_Units/defaults/should_switch_to_metric_if_specified.yml +62 -0
  47. data/spec/fixtures/cassettes/Weather_Wind/should_contain_chill_direction_and_speed_as_integers.yml +62 -0
  48. data/spec/lib/astronomy_spec.rb +12 -0
  49. data/spec/lib/atmosphere_spec.rb +20 -0
  50. data/spec/lib/condition_spec.rb +14 -0
  51. data/spec/lib/forecast_spec.rb +28 -0
  52. data/spec/lib/image_spec.rb +11 -0
  53. data/spec/lib/location_spec.rb +36 -0
  54. data/spec/lib/response_spec.rb +57 -0
  55. data/spec/lib/units_spec.rb +30 -0
  56. data/spec/lib/utils_spec.rb +11 -0
  57. data/spec/lib/version_spec.rb +7 -0
  58. data/spec/lib/wind_spec.rb +13 -0
  59. data/spec/{helper.rb → spec_helper.rb} +3 -5
  60. data/weather-api.gemspec +9 -11
  61. metadata +127 -88
  62. data/Guardfile +0 -19
  63. data/lib/weather-api/api.rb +0 -33
  64. data/spec/cases/api_spec.rb +0 -8
  65. data/spec/cases/astronomy_spec.rb +0 -15
  66. data/spec/cases/atmosphere_spec.rb +0 -23
  67. data/spec/cases/condition_spec.rb +0 -17
  68. data/spec/cases/forecast_spec.rb +0 -32
  69. data/spec/cases/image_spec.rb +0 -21
  70. data/spec/cases/location_spec.rb +0 -41
  71. data/spec/cases/response_spec.rb +0 -60
  72. data/spec/cases/units_spec.rb +0 -36
  73. data/spec/cases/utils_spec.rb +0 -13
  74. data/spec/cases/version_spec.rb +0 -8
  75. data/spec/cases/wind_spec.rb +0 -16
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:50:18 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1528'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:50:19Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:46 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:50:18 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1529'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:50:19Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:47 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=614274%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine10.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 07:15:47 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '2'
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T07:15:48Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Nice, FR","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Nice__FR/*http://weather.yahoo.com/forecast/FRXX0073_f.html","description":"Yahoo!
47
+ Weather for Nice, FR","language":"en-us","lastBuildDate":"Fri, 29 Mar 2013
48
+ 7:29 am CET","ttl":"60","location":{"city":"Nice","country":"France","region":""},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"47","direction":"340","speed":"8"},"atmosphere":{"humidity":"82","pressure":"29.71","rising":"0","visibility":"6.21"},"astronomy":{"sunrise":"6:18
49
+ am","sunset":"6:51 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Nice, FR at 7:29 am CET","lat":"43.7","long":"7.28","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Nice__FR/*http://weather.yahoo.com/forecast/FRXX0073_f.html","pubDate":"Fri,
51
+ 29 Mar 2013 7:29 am CET","condition":{"code":"28","date":"Fri, 29 Mar 2013
52
+ 7:29 am CET","temp":"50","text":"Mostly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/28.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nMostly Cloudy, 50 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nFri - Cloudy/Wind. High: 64 Low: 49<br />\nSat - AM Showers. High: 57
55
+ Low: 45<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Nice__FR/*http://weather.yahoo.com/forecast/FRXX0073_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"24","date":"29 Mar
58
+ 2013","day":"Fri","high":"64","low":"49","text":"Cloudy/Wind"},{"code":"39","date":"30
59
+ Mar 2013","day":"Sat","high":"57","low":"45","text":"AM Showers"}],"guid":{"isPermaLink":"false","content":"FRXX0073_2013_03_30_7_00_CET"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:48 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=2490383%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3600
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 07:15:47 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '0'
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T07:15:47Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Seattle, WA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Seattle__WA/*http://weather.yahoo.com/forecast/USWA0395_f.html","description":"Yahoo!
47
+ Weather for Seattle, WA","language":"en-us","lastBuildDate":"Thu, 28 Mar 2013
48
+ 10:52 pm PDT","ttl":"60","location":{"city":"Seattle","country":"United States","region":"WA"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"53","direction":"0","speed":"0"},"atmosphere":{"humidity":"74","pressure":"30.14","rising":"1","visibility":"10"},"astronomy":{"sunrise":"6:54
49
+ am","sunset":"7:32 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Seattle, WA at 10:52 pm PDT","lat":"47.6","long":"-122.33","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Seattle__WA/*http://weather.yahoo.com/forecast/USWA0395_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 10:52 pm PDT","condition":{"code":"27","date":"Thu, 28 Mar 2013
52
+ 10:52 pm PDT","temp":"53","text":"Mostly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/27.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nMostly Cloudy, 53 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Mostly Cloudy. High: 61 Low: 48<br />\nFri - AM Clouds/PM Sun. High:
55
+ 65 Low: 47<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Seattle__WA/*http://weather.yahoo.com/forecast/USWA0395_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"27","date":"28 Mar
58
+ 2013","day":"Thu","high":"61","low":"48","text":"Mostly Cloudy"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"65","low":"47","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"USWA0395_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:47 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:50:18 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1529'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:50:19Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:47 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:50:18 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1529'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:50:19Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:47 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:50:18 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1531'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:50:19Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:49 GMT
62
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://query.yahooapis.com/v1/public/yql?format=json&q=select%20*%20from%20weather.forecast%20where%20woeid=9848%20and%20u='f'
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - '*/*'
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - query.yahooapis.com
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ X-Yql-Host:
24
+ - engine6.yql.ne1.yahoo.com
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Cache-Control:
28
+ - public, max-age=3599
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Date:
34
+ - Fri, 29 Mar 2013 06:53:57 GMT
35
+ Server:
36
+ - YTS/1.20.13
37
+ Age:
38
+ - '1312'
39
+ Content-Length:
40
+ - '880'
41
+ Connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"query":{"count":1,"created":"2013-03-29T06:53:57Z","lang":"en-US","results":{"channel":{"title":"Yahoo!
46
+ Weather - Victoria, CA","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","description":"Yahoo!
47
+ Weather for Victoria, CA","language":"en-us","lastBuildDate":"Thu, 28 Mar
48
+ 2013 8:59 pm PDT","ttl":"60","location":{"city":"Victoria","country":"Canada","region":"BC"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"46","direction":"230","speed":"5"},"atmosphere":{"humidity":"82","pressure":"30.11","rising":"1","visibility":""},"astronomy":{"sunrise":"6:59
49
+ am","sunset":"7:36 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http://weather.yahoo.com","url":"http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"},"item":{"title":"Conditions
50
+ for Victoria, CA at 8:59 pm PDT","lat":"48.43","long":"-123.36","link":"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html","pubDate":"Thu,
51
+ 28 Mar 2013 8:59 pm PDT","condition":{"code":"29","date":"Thu, 28 Mar 2013
52
+ 8:59 pm PDT","temp":"48","text":"Partly Cloudy"},"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/29.gif\"/><br
53
+ />\n<b>Current Conditions:</b><br />\nPartly Cloudy, 48 F<BR />\n<BR /><b>Forecast:</b><BR
54
+ />\nThu - Clear. High: 55 Low: 43<br />\nFri - AM Clouds/PM Sun. High: 55
55
+ Low: 44<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Victoria__CA/*http://weather.yahoo.com/forecast/CAXX0523_f.html\">Full
56
+ Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\"
57
+ >The Weather Channel</a>)<br/>\n","forecast":[{"code":"31","date":"28 Mar
58
+ 2013","day":"Thu","high":"55","low":"43","text":"Clear"},{"code":"30","date":"29
59
+ Mar 2013","day":"Fri","high":"55","low":"44","text":"AM Clouds/PM Sun"}],"guid":{"isPermaLink":"false","content":"CAXX0523_2013_03_29_7_00_PDT"}}}}}}'
60
+ http_version:
61
+ recorded_at: Fri, 29 Mar 2013 07:15:49 GMT
62
+ recorded_with: VCR 2.4.0