barometer 0.7.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +7 -0
  3. data/LICENSE +1 -1
  4. data/{README.rdoc → README.md} +124 -110
  5. data/Rakefile +1 -21
  6. data/TODO +8 -9
  7. data/barometer.gemspec +20 -19
  8. data/bin/barometer +36 -83
  9. data/lib/barometer.rb +13 -11
  10. data/lib/barometer/base.rb +10 -10
  11. data/lib/barometer/data.rb +1 -1
  12. data/lib/barometer/data/distance.rb +25 -25
  13. data/lib/barometer/data/geo.rb +9 -9
  14. data/lib/barometer/data/local_datetime.rb +24 -20
  15. data/lib/barometer/data/local_time.rb +13 -13
  16. data/lib/barometer/data/location.rb +6 -6
  17. data/lib/barometer/data/pressure.rb +24 -24
  18. data/lib/barometer/data/speed.rb +28 -28
  19. data/lib/barometer/data/sun.rb +7 -7
  20. data/lib/barometer/data/temperature.rb +29 -29
  21. data/lib/barometer/data/units.rb +9 -9
  22. data/lib/barometer/data/zone.rb +19 -19
  23. data/lib/barometer/formats.rb +1 -1
  24. data/lib/barometer/formats/coordinates.rb +7 -7
  25. data/lib/barometer/formats/format.rb +6 -6
  26. data/lib/barometer/formats/geocode.rb +5 -5
  27. data/lib/barometer/formats/icao.rb +6 -6
  28. data/lib/barometer/formats/postalcode.rb +3 -3
  29. data/lib/barometer/formats/short_zipcode.rb +2 -2
  30. data/lib/barometer/formats/weather_id.rb +10 -10
  31. data/lib/barometer/formats/woe_id.rb +20 -20
  32. data/lib/barometer/formats/zipcode.rb +3 -3
  33. data/lib/barometer/key_file_parser.rb +20 -0
  34. data/lib/barometer/measurements/measurement.rb +32 -32
  35. data/lib/barometer/measurements/result.rb +39 -39
  36. data/lib/barometer/measurements/result_array.rb +12 -12
  37. data/lib/barometer/query.rb +15 -15
  38. data/lib/barometer/services.rb +3 -3
  39. data/lib/barometer/translations/icao_country_codes.yml +20 -20
  40. data/lib/barometer/translations/weather_country_codes.yml +1 -1
  41. data/lib/barometer/translations/zone_codes.yml +2 -2
  42. data/lib/barometer/version.rb +3 -0
  43. data/lib/barometer/weather.rb +27 -27
  44. data/lib/barometer/weather_services/noaa.rb +314 -3
  45. data/lib/barometer/weather_services/service.rb +32 -30
  46. data/lib/barometer/weather_services/weather_bug.rb +35 -33
  47. data/lib/barometer/weather_services/wunderground.rb +31 -29
  48. data/lib/barometer/weather_services/yahoo.rb +36 -35
  49. data/lib/barometer/web_services/geocode.rb +5 -7
  50. data/lib/barometer/web_services/noaa_station_id.rb +53 -0
  51. data/lib/barometer/web_services/placemaker.rb +11 -13
  52. data/lib/barometer/web_services/timezone.rb +5 -7
  53. data/lib/barometer/web_services/weather_id.rb +4 -6
  54. data/lib/barometer/web_services/web_service.rb +4 -4
  55. data/spec/barometer_spec.rb +25 -27
  56. data/spec/cassettes/Barometer.json +1 -0
  57. data/spec/cassettes/Query.json +1 -0
  58. data/spec/cassettes/Query_Format_Coordinates.json +1 -0
  59. data/spec/cassettes/Query_Format_Geocode.json +1 -0
  60. data/spec/cassettes/Query_Format_WeatherID.json +1 -0
  61. data/spec/cassettes/Query_Format_WoeID.json +1 -0
  62. data/spec/cassettes/WeatherService.json +1 -0
  63. data/spec/cassettes/WeatherService_Noaa.json +1 -0
  64. data/spec/cassettes/WeatherService_WeatherBug.json +1 -0
  65. data/spec/cassettes/WeatherService_Wunderground.json +1 -0
  66. data/spec/cassettes/WeatherService_Yahoo.json +1 -0
  67. data/spec/cassettes/WebService_Geocode.json +1 -0
  68. data/spec/cassettes/WebService_NoaaStation.json +1 -0
  69. data/spec/data/distance_spec.rb +60 -60
  70. data/spec/data/geo_spec.rb +23 -23
  71. data/spec/data/local_datetime_spec.rb +44 -44
  72. data/spec/data/local_time_spec.rb +47 -47
  73. data/spec/data/location_spec.rb +16 -16
  74. data/spec/data/pressure_spec.rb +61 -61
  75. data/spec/data/speed_spec.rb +69 -69
  76. data/spec/data/sun_spec.rb +25 -25
  77. data/spec/data/temperature_spec.rb +68 -68
  78. data/spec/data/units_spec.rb +21 -21
  79. data/spec/data/zone_spec.rb +35 -35
  80. data/spec/formats/coordinates_spec.rb +27 -27
  81. data/spec/formats/format_spec.rb +17 -25
  82. data/spec/formats/geocode_spec.rb +23 -31
  83. data/spec/formats/icao_spec.rb +26 -32
  84. data/spec/formats/postalcode_spec.rb +22 -28
  85. data/spec/formats/short_zipcode_spec.rb +20 -26
  86. data/spec/formats/weather_id_spec.rb +57 -67
  87. data/spec/formats/woe_id_spec.rb +59 -59
  88. data/spec/formats/zipcode_spec.rb +39 -47
  89. data/spec/key_file_parser_spec.rb +28 -0
  90. data/spec/measurements/measurement_spec.rb +79 -133
  91. data/spec/measurements/result_array_spec.rb +23 -38
  92. data/spec/measurements/result_spec.rb +100 -128
  93. data/spec/query_spec.rb +83 -100
  94. data/spec/spec_helper.rb +24 -6
  95. data/spec/weather_services/noaa_spec.rb +179 -0
  96. data/spec/weather_services/services_spec.rb +28 -36
  97. data/spec/weather_services/weather_bug_spec.rb +57 -77
  98. data/spec/weather_services/wunderground_spec.rb +36 -65
  99. data/spec/weather_services/yahoo_spec.rb +38 -60
  100. data/spec/weather_spec.rb +79 -79
  101. data/spec/web_services/geocode_spec.rb +7 -11
  102. data/spec/web_services/noaa_station_id_spec.rb +33 -0
  103. data/spec/web_services/placemaker_spec.rb +7 -12
  104. data/spec/web_services/web_services_spec.rb +3 -9
  105. metadata +214 -163
  106. data/VERSION.yml +0 -5
  107. data/lib/barometer/weather_services/google.rb +0 -142
  108. data/lib/barometer/weather_services/weather_dot_com.rb +0 -279
  109. data/spec/fakeweb_helper.rb +0 -179
  110. data/spec/fixtures/formats/weather_id/90210.xml +0 -7
  111. data/spec/fixtures/formats/weather_id/from_USGA0028.xml +0 -3
  112. data/spec/fixtures/formats/weather_id/ksfo.xml +0 -1
  113. data/spec/fixtures/formats/weather_id/manhattan.xml +0 -7
  114. data/spec/fixtures/formats/weather_id/new_york.xml +0 -1
  115. data/spec/fixtures/formats/weather_id/the_hills.xml +0 -1
  116. data/spec/fixtures/geocode/40_73_v3.json +0 -497
  117. data/spec/fixtures/geocode/90210_v3.json +0 -63
  118. data/spec/fixtures/geocode/T5B4M9_v3.json +0 -68
  119. data/spec/fixtures/geocode/atlanta_v3.json +0 -58
  120. data/spec/fixtures/geocode/calgary_ab_v3.json +0 -58
  121. data/spec/fixtures/geocode/ksfo_v3.json +0 -73
  122. data/spec/fixtures/geocode/newyork_ny_v3.json +0 -58
  123. data/spec/fixtures/services/google/calgary_ab.xml +0 -1
  124. data/spec/fixtures/services/placemaker/T5B4M9.xml +0 -65
  125. data/spec/fixtures/services/placemaker/atlanta.xml +0 -65
  126. data/spec/fixtures/services/placemaker/coords.xml +0 -65
  127. data/spec/fixtures/services/placemaker/ksfo.xml +0 -65
  128. data/spec/fixtures/services/placemaker/new_york.xml +0 -65
  129. data/spec/fixtures/services/placemaker/the_hills.xml +0 -65
  130. data/spec/fixtures/services/placemaker/w615702.xml +0 -47
  131. data/spec/fixtures/services/weather_bug/90210_current.xml +0 -93
  132. data/spec/fixtures/services/weather_bug/90210_forecast.xml +0 -76
  133. data/spec/fixtures/services/weather_dot_com/90210.xml +0 -1
  134. data/spec/fixtures/services/wunderground/current_calgary_ab.xml +0 -9
  135. data/spec/fixtures/services/wunderground/forecast_calgary_ab.xml +0 -13
  136. data/spec/fixtures/services/yahoo/90210.xml +0 -3
  137. data/spec/weather_services/google_spec.rb +0 -181
  138. data/spec/weather_services/weather_dot_com_spec.rb +0 -224
@@ -1,76 +0,0 @@
1
- <?xml version="1.0"?>
2
- <aws:weather xmlns:aws="http://www.aws.com/aws">
3
- <aws:api version="2.0"/>
4
- <aws:WebURL>http://weather.weatherbug.com/CA/Beverly Hills-weather/local-forecast/7-day-forecast.html?ZCode=Z5546&amp;Units=1</aws:WebURL>
5
- <aws:forecasts type="Detailed" date="6/2/2011 3:22:00 AM">
6
- <aws:location>
7
- <aws:city>Beverly Hills</aws:city>
8
- <aws:state>CA</aws:state>
9
- <aws:zip>90210</aws:zip>
10
- <aws:zone>CA041</aws:zone>
11
- </aws:location>
12
- <aws:forecast>
13
- <aws:title alttitle="THU">Thursday</aws:title>
14
- <aws:short-prediction>Sunny</aws:short-prediction>
15
- <aws:image isNight="0" icon="cond007.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond007.gif</aws:image>
16
- <aws:description>Thursday</aws:description>
17
- <aws:prediction>Sunny. Highs in the upper 60s to mid 70s. West winds 15 to 25 mph in the afternoon.</aws:prediction>
18
- <aws:high units="&amp;deg;C">24</aws:high>
19
- <aws:low units="&amp;deg;C">11</aws:low>
20
- </aws:forecast>
21
- <aws:forecast>
22
- <aws:title alttitle="FRI">Friday</aws:title>
23
- <aws:short-prediction>Sunny</aws:short-prediction>
24
- <aws:image isNight="0" icon="cond007.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond007.gif</aws:image>
25
- <aws:description>Friday</aws:description>
26
- <aws:prediction>Sunny. Highs from around 70 at the beaches to around 80 inland. Southwest winds around 15 mph in the afternoon.</aws:prediction>
27
- <aws:high units="&amp;deg;C">26</aws:high>
28
- <aws:low units="&amp;deg;C">12</aws:low>
29
- </aws:forecast>
30
- <aws:forecast>
31
- <aws:title alttitle="SAT">Saturday</aws:title>
32
- <aws:short-prediction>Partly Cloudy</aws:short-prediction>
33
- <aws:image isNight="0" icon="cond003.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond003.gif</aws:image>
34
- <aws:description>Saturday</aws:description>
35
- <aws:prediction>Partly cloudy in the morning then becoming mostly cloudy. Highs in the upper 60s to mid 70s.</aws:prediction>
36
- <aws:high units="&amp;deg;C">24</aws:high>
37
- <aws:low units="&amp;deg;C">12</aws:low>
38
- </aws:forecast>
39
- <aws:forecast>
40
- <aws:title alttitle="SUN">Sunday</aws:title>
41
- <aws:short-prediction>Mostly Cloudy</aws:short-prediction>
42
- <aws:image isNight="0" icon="cond024.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond024.gif</aws:image>
43
- <aws:description>Sunday</aws:description>
44
- <aws:prediction>Mostly cloudy with a 20 percent chance of showers. Highs in the mid 60s to around 70.</aws:prediction>
45
- <aws:high units="&amp;deg;C">23</aws:high>
46
- <aws:low units="&amp;deg;C">12</aws:low>
47
- </aws:forecast>
48
- <aws:forecast>
49
- <aws:title alttitle="MON">Monday</aws:title>
50
- <aws:short-prediction>Partly Cloudy</aws:short-prediction>
51
- <aws:image isNight="0" icon="cond003.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond003.gif</aws:image>
52
- <aws:description>Monday</aws:description>
53
- <aws:prediction>Partly cloudy in the morning then becoming mostly sunny. Highs in the mid 60s to lower 70s.</aws:prediction>
54
- <aws:high units="&amp;deg;C">23</aws:high>
55
- <aws:low units="&amp;deg;C">13</aws:low>
56
- </aws:forecast>
57
- <aws:forecast>
58
- <aws:title alttitle="TUE">Tuesday</aws:title>
59
- <aws:short-prediction>Mostly Sunny</aws:short-prediction>
60
- <aws:image isNight="0" icon="cond026.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond026.gif</aws:image>
61
- <aws:description>Tuesday</aws:description>
62
- <aws:prediction>Mostly clear. Lows in the mid to upper 50s. Highs in the upper 60s to mid 70s.</aws:prediction>
63
- <aws:high units="&amp;deg;C">24</aws:high>
64
- <aws:low units="&amp;deg;C">13</aws:low>
65
- </aws:forecast>
66
- <aws:forecast>
67
- <aws:title alttitle="WED">Wednesday</aws:title>
68
- <aws:short-prediction>Mostly Sunny</aws:short-prediction>
69
- <aws:image isNight="0" icon="cond026.gif">http://deskwx.weatherbug.com/images/Forecast/icons/cond026.gif</aws:image>
70
- <aws:description>Wednesday</aws:description>
71
- <aws:prediction>Night through morning low clouds and fog...otherwise mostly clear. Lows in the mid to upper 50s. Highs in the upper 60s to mid 70s.</aws:prediction>
72
- <aws:high units="&amp;deg;C">24</aws:high>
73
- <aws:low units="&amp;deg;C">--</aws:low>
74
- </aws:forecast>
75
- </aws:forecasts>
76
- </aws:weather>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?> <!-- This document is intended only for use by authorized licensees of The --> <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, --> <!-- The Weather Channel Interactive, Inc. All Rights Reserved. --> <weather ver="2.0"> <head> <locale>en_US</locale> <form>MEDIUM</form> <ut>C</ut> <ud>km</ud> <us>km/h</us> <up>mb</up> <ur>mm</ur> </head> <loc id="90210"> <dnam>Beverly Hills, CA (90210)</dnam> <tm>3:32 PM</tm> <lat>34.10</lat> <lon>-118.41</lon> <sunr>5:43 AM</sunr> <suns>8:00 PM</suns> <zone>-7</zone> </loc> <lnks type="prmo"> <link pos="1"> <l>http://www.weather.com/allergies?par=xoap&amp;site=textlink&amp;cm_ven=XOAP&amp;cm_cat=TextLink&amp;cm_pla=Link1&amp;cm_ite=Allergies</l> <t>Local Pollen Reports</t> </link> <link pos="2"> <l>http://www.weather.com/flights?par=xoap&amp;site=textlink&amp;cm_ven=XOAP&amp;cm_cat=TextLink&amp;cm_pla=Link2&amp;cm_ite=BusinessTraveler</l> <t>Airport Conditions</t> </link> <link pos="3"> <l>http://www.weather.com/garden?par=xoap&amp;site=textlink&amp;cm_ven=XOAP&amp;cm_cat=TextLink&amp;cm_pla=Link3&amp;cm_ite=Garden</l> <t>Lawn and Garden Weather</t> </link> <link pos="4"> <l>http://www.weather.com/traffic?par=xoap&amp;site=textlink&amp;cm_ven=XOAP&amp;cm_cat=TextLink&amp;cm_pla=Link4&amp;cm_ite=Traffic</l> <t>Rush Hour Traffic</t> </link> </lnks> <cc> <lsup>6/1/11 2:51 PM PDT</lsup> <obst>Santa Monica, CA</obst> <tmp>17</tmp> <flik>17</flik> <t>Fair</t> <icon>34</icon> <bar> <r>1017.9</r> <d>falling</d> </bar> <wind> <s>14</s> <gust>N/A</gust> <d>230</d> <t>SW</t> </wind> <hmid>65</hmid> <vis>16.1</vis> <uv> <i>8</i> <t>Very High</t> </uv> <dewp>10</dewp> <moon> <icon>0</icon> <t>New</t> </moon> </cc> <dayf> <lsup>6/1/11 2:09 PM PDT</lsup> <day d="0" t="Wednesday" dt="Jun 1"> <hi>N/A</hi> <low>12</low> <sunr>5:43 AM</sunr> <suns>8:00 PM</suns> <part p="d"> <icon>44</icon> <t>N/A</t> <wind> <s>N/A</s> <gust>N/A</gust> <d>N/A</d> <t>N/A</t> </wind> <bt>N/A</bt> <ppcp>0</ppcp> <hmid>N/A</hmid> </part> <part p="n"> <icon>31</icon> <t>Clear</t> <wind> <s>16</s> <gust>N/A</gust> <d>343</d> <t>NNW</t> </wind> <bt>Clear</bt> <ppcp>0</ppcp> <hmid>62</hmid> </part> </day> <day d="1" t="Thursday" dt="Jun 2"> <hi>23</hi> <low>12</low> <sunr>5:43 AM</sunr> <suns>8:01 PM</suns> <part p="d"> <icon>34</icon> <t>Mostly Sunny</t> <wind> <s>21</s> <gust>N/A</gust> <d>215</d> <t>SW</t> </wind> <bt>M Sunny</bt> <ppcp>0</ppcp> <hmid>42</hmid> </part> <part p="n"> <icon>31</icon> <t>Clear</t> <wind> <s>16</s> <gust>N/A</gust> <d>357</d> <t>N</t> </wind> <bt>Clear</bt> <ppcp>0</ppcp> <hmid>53</hmid> </part> </day> <day d="2" t="Friday" dt="Jun 3"> <hi>24</hi> <low>13</low> <sunr>5:43 AM</sunr> <suns>8:01 PM</suns> <part p="d"> <icon>32</icon> <t>Sunny</t> <wind> <s>16</s> <gust>N/A</gust> <d>181</d> <t>S</t> </wind> <bt>Sunny</bt> <ppcp>0</ppcp> <hmid>36</hmid> </part> <part p="n"> <icon>29</icon> <t>Partly Cloudy</t> <wind> <s>8</s> <gust>N/A</gust> <d>184</d> <t>S</t> </wind> <bt>P Cloudy</bt> <ppcp>20</ppcp> <hmid>55</hmid> </part> </day> <day d="3" t="Saturday" dt="Jun 4"> <hi>20</hi> <low>13</low> <sunr>5:43 AM</sunr> <suns>8:02 PM</suns> <part p="d"> <icon>30</icon> <t>Partly Cloudy</t> <wind> <s>14</s> <gust>N/A</gust> <d>180</d> <t>S</t> </wind> <bt>P Cloudy</bt> <ppcp>20</ppcp> <hmid>59</hmid> </part> <part p="n"> <icon>33</icon> <t>Mostly Clear</t> <wind> <s>6</s> <gust>N/A</gust> <d>217</d> <t>SW</t> </wind> <bt>M Clear</bt> <ppcp>0</ppcp> <hmid>67</hmid> </part> </day> <day d="4" t="Sunday" dt="Jun 5"> <hi>21</hi> <low>12</low> <sunr>5:42 AM</sunr> <suns>8:02 PM</suns> <part p="d"> <icon>39</icon> <t>Scattered Showers</t> <wind> <s>16</s> <gust>N/A</gust> <d>214</d> <t>SW</t> </wind> <bt>Sct Showers</bt> <ppcp>30</ppcp> <hmid>63</hmid> </part> <part p="n"> <icon>31</icon> <t>Clear</t> <wind> <s>6</s> <gust>N/A</gust> <d>264</d> <t>W</t> </wind> <bt>Clear</bt> <ppcp>0</ppcp> <hmid>65</hmid> </part> </day> </dayf> </weather>
@@ -1,9 +0,0 @@
1
- <current_observation> <credit>Weather Underground NOAA Weather Station</credit> <credit_URL>http://wunderground.com/</credit_URL> <termsofservice link="http://www.wunderground.com/members/tos.asp#api" /> <image> <url>http://icons-pe.wxug.com/graphics/wu2/logo_130x80.png</url> <title>Weather Underground</title> <link>http://wunderground.com/</link> </image> <display_location> <full>Calgary, Alberta</full> <city>Calgary</city> <state>AB</state> <state_name>Alberta</state_name> <country>CA</country> <country_iso3166>CA</country_iso3166> <zip>00000</zip> <latitude>51.11999893</latitude> <longitude>-114.01999664</longitude> <elevation>1084.00000000 ft</elevation> </display_location> <observation_location> <full>Calgary, </full> <city>Calgary</city> <state></state> <country>CA</country> <country_iso3166>CA</country_iso3166> <latitude>51.11999893</latitude> <longitude>-114.01999664</longitude> <elevation>3556 ft</elevation> </observation_location> <station_id>CYYC</station_id> <observation_time>Last Updated on June 1, 4:00 PM MDT</observation_time> <observation_time_rfc822>Wed, 01 Jun 2011 22:00:00 GMT</observation_time_rfc822> <observation_epoch>1306965600</observation_epoch> <local_time>June 1, 4:46 PM MDT</local_time> <local_time_rfc822>Wed, 01 Jun 2011 22:46:38 GMT</local_time_rfc822> <local_epoch>1306968398</local_epoch> <weather>Mostly Cloudy</weather> <temperature_string>63 F (17 C)</temperature_string> <temp_f>63</temp_f> <temp_c>17</temp_c> <relative_humidity>48%</relative_humidity> <wind_string>From the SE at 16 MPH </wind_string> <wind_dir>SE</wind_dir> <wind_degrees>140</wind_degrees> <wind_mph>16</wind_mph> <wind_gust_mph></wind_gust_mph> <pressure_string>29.85 in (1011 mb)</pressure_string> <pressure_mb>1011</pressure_mb> <pressure_in>29.85</pressure_in> <dewpoint_string>43 F (6 C)</dewpoint_string> <dewpoint_f>43</dewpoint_f> <dewpoint_c>6</dewpoint_c>
2
-
3
- <heat_index_string>NA</heat_index_string> <heat_index_f>NA</heat_index_f> <heat_index_c>NA</heat_index_c>
4
-
5
- <windchill_string>NA</windchill_string> <windchill_f>NA</windchill_f> <windchill_c>NA</windchill_c>
6
-
7
- <visibility_mi>30.0</visibility_mi> <visibility_km>48.3</visibility_km> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/mostlycloudy.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/mostlycloudy.gif</icon_url> </icon_set> </icons> <icon_url_base>http://icons-pe.wxug.com/graphics/conds/</icon_url_base> <icon_url_name>.GIF</icon_url_name> <icon>mostlycloudy</icon> <forecast_url>http://www.wunderground.com/global/stations/71877.html</forecast_url> <history_url>http://www.wunderground.com/history/airport/CYYC/2011/6/1/DailyHistory.html</history_url> <ob_url>http://www.wunderground.com/cgi-bin/findweather/getForecast?query=51.11999893,-114.01999664</ob_url> </current_observation>
8
-
9
- <!-- 0.075:0 -->
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" ?> <forecast> <termsofservice link="http://www.wunderground.com/members/tos.asp#api" /> <txt_forecast> <date>6:00 AM MDT</date> <number></number> <forecastday> <period>0</period> <icon>chancetstorms</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancetstorms.gif</icon_url> </icon_set> </icons> <title>June 1, 2011</title> <fcttext>Chance of a Thunderstorm. High 15&amp;deg;C (59&amp;deg;F). Winds 21 kph SE</fcttext> <pop>30</pop> </forecastday> <forecastday> <period>1</period> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <title>June 2, 2011</title> <fcttext>Chance of Rain. High 16&amp;deg;C (60&amp;deg;F). Winds 18 kph North</fcttext> <pop>30</pop> </forecastday> <forecastday> <period>2</period> <icon>chancetstorms</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancetstorms.gif</icon_url> </icon_set> </icons> <title>June 3, 2011</title> <fcttext>Chance of a Thunderstorm. High 16&amp;deg;C (60&amp;deg;F). Winds 21 kph North</fcttext> <pop>30</pop> </forecastday> <forecastday> <period>3</period> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <title>June 4, 2011</title> <fcttext>Chance of Rain. High 15&amp;deg;C (59&amp;deg;F). Winds 18 kph SSE</fcttext> <pop>30</pop> </forecastday> <forecastday> <period>4</period> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <title>June 5, 2011</title> <fcttext>Chance of Rain. High 24&amp;deg;C (75&amp;deg;F). Winds 7 kph WNW</fcttext> <pop>20</pop> </forecastday> <forecastday> <period>5</period> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <title>June 6, 2011</title> <fcttext>Chance of Rain. High 18&amp;deg;C (64&amp;deg;F). Winds 10 kph East</fcttext> <pop>20</pop> </forecastday> </txt_forecast> <simpleforecast> <forecastday> <period>1</period> <date> <epoch>1306983600</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 01, 2011</pretty> <day>1</day> <month>6</month> <year>2011</year> <yday>151</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Wednesday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>61</fahrenheit> <celsius>16</celsius> </high> <low> <fahrenheit>45</fahrenheit> <celsius>7</celsius> </low> <conditions>Chance of a Thunderstorm</conditions> <icon>chancetstorms</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancetstorms.gif</icon_url> </icon_set> </icons> <skyicon>mostlycloudy</skyicon> <pop>30</pop> </forecastday>
2
-
3
- <forecastday> <period>2</period> <date> <epoch>1307070000</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 02, 2011</pretty> <day>2</day> <month>6</month> <year>2011</year> <yday>152</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Thursday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>64</fahrenheit> <celsius>18</celsius> </high> <low> <fahrenheit>45</fahrenheit> <celsius>7</celsius> </low> <conditions>Chance of Rain</conditions> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <skyicon>cloudy</skyicon> <pop>30</pop> </forecastday>
4
-
5
- <forecastday> <period>3</period> <date> <epoch>1307156400</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 03, 2011</pretty> <day>3</day> <month>6</month> <year>2011</year> <yday>153</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Friday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>61</fahrenheit> <celsius>16</celsius> </high> <low> <fahrenheit>36</fahrenheit> <celsius>2</celsius> </low> <conditions>Chance of a Thunderstorm</conditions> <icon>chancetstorms</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancetstorms.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancetstorms.gif</icon_url> </icon_set> </icons> <skyicon>partlycloudy</skyicon> <pop>40</pop> </forecastday>
6
-
7
- <forecastday> <period>4</period> <date> <epoch>1307242800</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 04, 2011</pretty> <day>4</day> <month>6</month> <year>2011</year> <yday>154</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Saturday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>54</fahrenheit> <celsius>12</celsius> </high> <low> <fahrenheit>43</fahrenheit> <celsius>6</celsius> </low> <conditions>Chance of Rain</conditions> <icon>chancerain</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/chancerain.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/chancerain.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/chancerain.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/chancerain.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/chancerain.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/chancerain.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/chancerain.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/chancerain.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/chancerain.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/chancerain.gif</icon_url> </icon_set> </icons> <skyicon>cloudy</skyicon> <pop>20</pop> </forecastday>
8
-
9
- <forecastday> <period>5</period> <date> <epoch>1307329200</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 05, 2011</pretty> <day>5</day> <month>6</month> <year>2011</year> <yday>155</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Sunday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>70</fahrenheit> <celsius>21</celsius> </high> <low> <fahrenheit>46</fahrenheit> <celsius>8</celsius> </low> <conditions>Partly Cloudy</conditions> <icon>partlycloudy</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/partlycloudy.gif</icon_url> </icon_set> </icons> <skyicon>partlycloudy</skyicon> <pop>0</pop> </forecastday>
10
-
11
- <forecastday> <period>6</period> <date> <epoch>1307415600</epoch> <pretty_short>9:00 PM MDT</pretty_short> <pretty>9:00 PM MDT on June 06, 2011</pretty> <day>6</day> <month>6</month> <year>2011</year> <yday>156</yday> <hour>21</hour> <min>00</min> <sec>0</sec> <isdst>1</isdst> <monthname>June</monthname> <weekday_short></weekday_short> <weekday>Monday</weekday> <ampm>PM</ampm> <tz_short>MDT</tz_short> <tz_long>America/Edmonton</tz_long> </date> <high> <fahrenheit>64</fahrenheit> <celsius>18</celsius> </high> <low> <fahrenheit>52</fahrenheit> <celsius>11</celsius> </low> <conditions>Fog</conditions> <icon>partlycloudy</icon> <icons> <icon_set name="Default"> <icon_url>http://icons-pe.wxug.com/i/c/a/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Smiley"> <icon_url>http://icons-pe.wxug.com/i/c/b/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Generic"> <icon_url>http://icons-pe.wxug.com/i/c/c/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Old School"> <icon_url>http://icons-pe.wxug.com/i/c/d/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Cartoon"> <icon_url>http://icons-pe.wxug.com/i/c/e/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Mobile"> <icon_url>http://icons-pe.wxug.com/i/c/f/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Simple"> <icon_url>http://icons-pe.wxug.com/i/c/g/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Contemporary"> <icon_url>http://icons-pe.wxug.com/i/c/h/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Helen"> <icon_url>http://icons-pe.wxug.com/i/c/i/partlycloudy.gif</icon_url> </icon_set> <icon_set name="Incredible"> <icon_url>http://icons-pe.wxug.com/i/c/k/partlycloudy.gif</icon_url> </icon_set> </icons> <skyicon>partlycloudy</skyicon> <pop>0</pop> </forecastday>
12
-
13
- </simpleforecast> <moon_phase> <percentIlluminated>0</percentIlluminated> <ageOfMoon>0</ageOfMoon> <current_time> <hour>16</hour> <minute>48</minute> </current_time> <sunset> <hour>21</hour> <minute>41</minute> </sunset> <sunrise> <hour>5</hour> <minute>26</minute> </sunrise> </moon_phase> </forecast>
@@ -1,3 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"> <channel>
2
-
3
- <title>Yahoo! Weather - Beverly Hills, CA</title> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html</link> <description>Yahoo! Weather for Beverly Hills, CA</description> <language>en-us</language> <lastBuildDate>Wed, 01 Jun 2011 2:50 pm PDT</lastBuildDate> <ttl>60</ttl> <yweather:location city="Beverly Hills" region="CA" country="US"/> <yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/> <yweather:wind chill="17" direction="230" speed="14.48" /> <yweather:atmosphere humidity="65" visibility="16.09" pressure="1017.8" rising="2" /> <yweather:astronomy sunrise="5:42 am" sunset="7:57 pm"/> <image> <title>Yahoo! Weather</title> <width>142</width> <height>18</height> <link>http://weather.yahoo.com</link> <url>http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif</url> </image> <item> <title>Conditions for Beverly Hills, CA at 2:50 pm PDT</title> <geo:lat>34.08</geo:lat> <geo:long>-118.4</geo:long> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html</link> <pubDate>Wed, 01 Jun 2011 2:50 pm PDT</pubDate> <yweather:condition text="Fair" code="34" temp="17" date="Wed, 01 Jun 2011 2:50 pm PDT" /> <description><![CDATA[ <img src="http://l.yimg.com/a/i/us/we/52/34.gif"/><br /> <b>Current Conditions:</b><br /> Fair, 17 C<BR /> <BR /><b>Forecast:</b><BR /> Wed - Clear. High: 21 Low: 12<br /> Thu - Mostly Sunny. High: 23 Low: 12<br /> <br /> <a href="http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/> (provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/> ]]></description> <yweather:forecast day="Wed" date="1 Jun 2011" low="12" high="21" text="Clear" code="31" /> <yweather:forecast day="Thu" date="2 Jun 2011" low="12" high="23" text="Mostly Sunny" code="34" /> <guid isPermaLink="false">USCA0090_2011_06_01_14_50_PDT</guid> </item> </channel> </rss> <!-- api8.weather.ac4.yahoo.com uncompressed/chunked Wed Jun 1 15:44:05 PDT 2011 -->
@@ -1,181 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
- include Barometer
3
-
4
- describe "Google" do
5
-
6
- before(:each) do
7
- @accepted_formats = [:zipcode, :postalcode, :geocode]
8
- @base_uri = "http://google.com"
9
- end
10
-
11
- describe "the class methods" do
12
-
13
- it "defines accepted_formats" do
14
- WeatherService::Google._accepted_formats.should == @accepted_formats
15
- end
16
-
17
- it "defines source_name" do
18
- WeatherService::Google._source_name.should == :google
19
- end
20
-
21
- # it "defines base_uri" do
22
- # Barometer::Google.base_uri.should == @base_uri
23
- # end
24
-
25
- it "defines get_all" do
26
- WeatherService::Google.respond_to?("_fetch").should be_true
27
- end
28
-
29
- end
30
-
31
- describe "building the current data" do
32
-
33
- it "defines the build method" do
34
- WeatherService::Google.respond_to?("_build_current").should be_true
35
- end
36
-
37
- it "requires Hash input" do
38
- lambda { WeatherService::Google._build_current }.should raise_error(ArgumentError)
39
- lambda { WeatherService::Google._build_current({}) }.should_not raise_error(ArgumentError)
40
- end
41
-
42
- it "returns Measurement::Current object" do
43
- current = WeatherService::Google._build_current({})
44
- current.is_a?(Measurement::Result).should be_true
45
- end
46
-
47
- end
48
-
49
- describe "building the forecast data" do
50
-
51
- it "defines the build method" do
52
- WeatherService::Google.respond_to?("_build_forecast").should be_true
53
- end
54
-
55
- it "requires Hash input" do
56
- lambda { WeatherService::Google._build_forecast }.should raise_error(ArgumentError)
57
- lambda { WeatherService::Google._build_forecast({}) }.should_not raise_error(ArgumentError)
58
- end
59
-
60
- it "returns Array object" do
61
- current = WeatherService::Google._build_forecast({})
62
- current.is_a?(Measurement::ResultArray).should be_true
63
- end
64
-
65
- end
66
-
67
- describe "building the location data" do
68
-
69
- it "defines the build method" do
70
- WeatherService::Google.respond_to?("_build_location").should be_true
71
- end
72
-
73
- it "requires Barometer::Geo input" do
74
- geo = Data::Geo.new({})
75
- lambda { WeatherService::Google._build_location(nil,{}) }.should raise_error(ArgumentError)
76
- lambda { WeatherService::Google._build_location(nil,geo) }.should_not raise_error(ArgumentError)
77
- end
78
-
79
- it "returns Barometer::Location object" do
80
- geo = Data::Geo.new({})
81
- location = WeatherService::Google._build_location(nil,geo)
82
- location.is_a?(Data::Location).should be_true
83
- end
84
-
85
- end
86
-
87
- # describe "building the timezone" do
88
- #
89
- # it "defines the build method" do
90
- # Barometer::Google.respond_to?("build_timezone").should be_true
91
- # end
92
- #
93
- # it "requires Hash input" do
94
- # lambda { Barometer::Google.build_timezone }.should raise_error(ArgumentError)
95
- # lambda { Barometer::Google.build_timezone({}) }.should_not raise_error(ArgumentError)
96
- # end
97
- #
98
- # end
99
-
100
- describe "when measuring" do
101
-
102
- before(:each) do
103
- @query = Barometer::Query.new("Calgary,AB")
104
- @measurement = Barometer::Measurement.new
105
- end
106
-
107
- describe "all" do
108
-
109
- it "responds to _measure" do
110
- Barometer::WeatherService::Google.respond_to?("_measure").should be_true
111
- end
112
-
113
- it "requires a Barometer::Measurement object" do
114
- lambda { Barometer::WeatherService::Google._measure(nil, @query) }.should raise_error(ArgumentError)
115
- lambda { Barometer::WeatherService::Google._measure("invalid", @query) }.should raise_error(ArgumentError)
116
-
117
- lambda { Barometer::WeatherService::Google._measure(@measurement, @query) }.should_not raise_error(ArgumentError)
118
- end
119
-
120
- it "requires a Barometer::Query query" do
121
- lambda { Barometer::WeatherService::Google._measure }.should raise_error(ArgumentError)
122
- lambda { Barometer::WeatherService::Google._measure(@measurement, 1) }.should raise_error(ArgumentError)
123
-
124
- lambda { Barometer::WeatherService::Google._measure(@measurement, @query) }.should_not raise_error(ArgumentError)
125
- end
126
-
127
- it "returns a Barometer::Measurement object" do
128
- result = Barometer::WeatherService::Google._measure(@measurement, @query)
129
- result.is_a?(Barometer::Measurement).should be_true
130
- result.current.is_a?(Measurement::Result).should be_true
131
- result.forecast.is_a?(Measurement::ResultArray).should be_true
132
- end
133
-
134
- end
135
-
136
- end
137
-
138
- # describe "overall data correctness" do
139
- #
140
- # before(:each) do
141
- # @query = Barometer::Query.new("Calgary,AB")
142
- # @query.preferred = "Calgary,AB"
143
- # @measurement = Barometer::Measurement.new
144
- #
145
- # FakeWeb.register_uri(:get,
146
- # "http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=#{CGI.escape(@query.preferred)}",
147
- # :body => File.read(File.join(File.dirname(__FILE__),
148
- # 'fixtures',
149
- # 'current_calgary_ab.xml')
150
- # )
151
- # )
152
- # FakeWeb.register_uri(:get,
153
- # "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=#{CGI.escape(@query.preferred)}",
154
- # :body => File.read(File.join(File.dirname(__FILE__),
155
- # 'fixtures',
156
- # 'forecast_calgary_ab.xml')
157
- # )
158
- # )
159
- # end
160
- #
161
- # # TODO: complete this
162
- # it "should correctly build the data" do
163
- # result = Barometer::Wunderground._measure(@measurement, @query)
164
- #
165
- # # build timezone
166
- # @measurement.timezone.timezone.should == "America/Edmonton"
167
- #
168
- # time = Time.local(2009, 4, 23, 18, 00, 0)
169
- # rise = Time.local(time.year, time.month, time.day, 6, 23)
170
- # set = Time.local(time.year, time.month, time.day, 20, 45)
171
- # sun_rise = @measurement.timezone.tz.local_to_utc(rise)
172
- # sun_set = @measurement.timezone.tz.local_to_utc(set)
173
- #
174
- # # build current
175
- # @measurement.current.sun.rise.should == sun_rise
176
- # @measurement.current.sun.set.should == sun_set
177
- # end
178
- #
179
- # end
180
-
181
- end
@@ -1,224 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
- include Barometer
3
-
4
- describe "WeatherDotCom" do
5
-
6
- before(:each) do
7
- @accepted_formats = [:short_zipcode, :weather_id]
8
- end
9
-
10
- describe "the class methods" do
11
-
12
- it "defines accepted_formats" do
13
- WeatherService::WeatherDotCom._accepted_formats.should == @accepted_formats
14
- end
15
-
16
- it "defines source_name" do
17
- WeatherService::WeatherDotCom._source_name.should == :weather_dot_com
18
- end
19
-
20
- it "defines get_all" do
21
- WeatherService::WeatherDotCom.respond_to?("_fetch").should be_true
22
- end
23
-
24
- it "defines _requires_keys?" do
25
- WeatherService::WeatherDotCom.respond_to?("_requires_keys?").should be_true
26
- WeatherService::WeatherDotCom._requires_keys?.should be_true
27
- end
28
-
29
- it "defines _has_keys?" do
30
- WeatherService::WeatherDotCom.respond_to?("_has_keys?").should be_true
31
- WeatherService::WeatherDotCom._has_keys?.should be_false
32
- WeatherService::WeatherDotCom.keys = { :partner => WEATHER_PARTNER_KEY, :license => WEATHER_LICENSE_KEY }
33
- WeatherService::WeatherDotCom._has_keys?.should be_true
34
- end
35
-
36
- end
37
-
38
- describe "building the current data" do
39
-
40
- it "defines the build method" do
41
- WeatherService::WeatherDotCom.respond_to?("_build_current").should be_true
42
- end
43
-
44
- it "requires Hash input" do
45
- lambda { WeatherService::WeatherDotCom._build_current }.should raise_error(ArgumentError)
46
- lambda { WeatherService::WeatherDotCom._build_current({}) }.should_not raise_error(ArgumentError)
47
- end
48
-
49
- it "returns Measurement::Current object" do
50
- current = WeatherService::WeatherDotCom._build_current({})
51
- current.is_a?(Measurement::Result).should be_true
52
- end
53
-
54
- end
55
-
56
- describe "building the forecast data" do
57
-
58
- it "defines the build method" do
59
- WeatherService::WeatherDotCom.respond_to?("_build_forecast").should be_true
60
- end
61
-
62
- it "requires Hash input" do
63
- lambda { WeatherService::WeatherDotCom._build_forecast }.should raise_error(ArgumentError)
64
- lambda { WeatherService::WeatherDotCom._build_forecast({}) }.should_not raise_error(ArgumentError)
65
- end
66
-
67
- it "returns Array object" do
68
- current = WeatherService::WeatherDotCom._build_forecast({})
69
- current.is_a?(Array).should be_true
70
- end
71
-
72
- end
73
-
74
- describe "building the location data" do
75
-
76
- it "defines the build method" do
77
- WeatherService::WeatherDotCom.respond_to?("_build_location").should be_true
78
- end
79
-
80
- it "requires Hash input" do
81
- lambda { WeatherService::WeatherDotCom._build_location }.should raise_error(ArgumentError)
82
- lambda { WeatherService::WeatherDotCom._build_location({}) }.should_not raise_error(ArgumentError)
83
- end
84
-
85
- it "requires Barometer::Geo input" do
86
- geo = Data::Geo.new({})
87
- lambda { WeatherService::WeatherDotCom._build_location({}, {}) }.should raise_error(ArgumentError)
88
- lambda { WeatherService::WeatherDotCom._build_location({}, geo) }.should_not raise_error(ArgumentError)
89
- end
90
-
91
- it "returns Barometer::Location object" do
92
- location = WeatherService::WeatherDotCom._build_location({})
93
- location.is_a?(Data::Location).should be_true
94
- end
95
-
96
- end
97
-
98
- describe "building the sun data" do
99
-
100
- it "defines the build method" do
101
- WeatherService::WeatherDotCom.respond_to?("_build_sun").should be_true
102
- end
103
-
104
- it "requires Hash input" do
105
- lambda { WeatherService::WeatherDotCom._build_sun }.should raise_error(ArgumentError)
106
- lambda { WeatherService::WeatherDotCom._build_sun({}) }.should_not raise_error(ArgumentError)
107
- end
108
-
109
- it "returns Barometer::Sun object" do
110
- sun = WeatherService::WeatherDotCom._build_sun({})
111
- sun.is_a?(Data::Sun).should be_true
112
- end
113
-
114
- end
115
-
116
- describe "when measuring" do
117
-
118
- before(:each) do
119
- @query = Barometer::Query.new("90210")
120
- @measurement = Barometer::Measurement.new
121
- end
122
-
123
- describe "all" do
124
-
125
- it "responds to _measure" do
126
- WeatherService::WeatherDotCom.respond_to?("_measure").should be_true
127
- end
128
-
129
- it "requires a Barometer::Measurement object" do
130
- lambda { WeatherService::WeatherDotCom._measure(nil, @query) }.should raise_error(ArgumentError)
131
- lambda { WeatherService::WeatherDotCom._measure("invalid", @query) }.should raise_error(ArgumentError)
132
-
133
- lambda { WeatherService::WeatherDotCom._measure(@measurement, @query) }.should_not raise_error(ArgumentError)
134
- end
135
-
136
- it "requires a Barometer::Query query" do
137
- lambda { WeatherService::WeatherDotCom._measure }.should raise_error(ArgumentError)
138
- lambda { WeatherService::WeatherDotCom._measure(@measurement, 1) }.should raise_error(ArgumentError)
139
-
140
- lambda { WeatherService::WeatherDotCom._measure(@measurement, @query) }.should_not raise_error(ArgumentError)
141
- end
142
-
143
- it "returns a Barometer::Measurement object" do
144
- result = WeatherService::WeatherDotCom._measure(@measurement, @query)
145
- result.is_a?(Barometer::Measurement).should be_true
146
- result.current.is_a?(Measurement::Result).should be_true
147
- result.forecast.is_a?(Measurement::ResultArray).should be_true
148
- end
149
-
150
- end
151
-
152
- end
153
-
154
- describe "overall data correctness" do
155
-
156
- before(:each) do
157
- @query = Barometer::Query.new("90210")
158
- @measurement = Barometer::Measurement.new
159
- end
160
-
161
- it "should correctly build the data" do
162
- result = WeatherService::WeatherDotCom._measure(@measurement, @query)
163
-
164
- # build current
165
- @measurement.current.humidity.to_i.should == 65
166
- @measurement.current.icon.should == "34"
167
- @measurement.current.condition.should == "Fair"
168
- @measurement.current.temperature.to_i.should == 17
169
- @measurement.current.dew_point.to_i.should == 10
170
- @measurement.current.wind_chill.to_i.should == 17
171
- @measurement.current.wind.to_i.should == 14
172
- @measurement.current.wind.degrees.to_i.should == 230
173
- @measurement.current.wind.direction.should == "SW"
174
- @measurement.current.pressure.to_f.should == 1017.9
175
- @measurement.current.visibility.to_f.should == 16.1
176
-
177
- # build sun
178
- @measurement.current.sun.rise.to_s.should == "05:43 am"
179
- @measurement.current.sun.set.to_s.should == "08:00 pm"
180
-
181
- # builds location
182
- @measurement.location.name.should == "Beverly Hills, CA (90210)"
183
- @measurement.location.latitude.to_f.should == 34.10
184
- @measurement.location.longitude.to_f.should == -118.41
185
-
186
- # builds forecasts
187
- @measurement.forecast.size.should == 10
188
-
189
- # day
190
- @measurement.forecast[0].valid_start_date.should == Date.parse("Jun 1 7:00 am")
191
- @measurement.forecast[0].valid_end_date.should == Date.parse("Jun 1 6:59:59 pm")
192
- @measurement.forecast[0].condition.should == "N/A"
193
- @measurement.forecast[0].icon.should == "44"
194
- @measurement.forecast[0].high.should be_nil
195
- @measurement.forecast[0].low.to_i.should == 12
196
- @measurement.forecast[0].pop.to_i.should == 0
197
- @measurement.forecast[0].humidity.to_i.should == 0
198
-
199
- @measurement.forecast[0].wind.should be_nil
200
- @measurement.forecast[0].wind.to_i.should be_nil
201
- @measurement.forecast[0].wind.degrees.to_i.should == 0
202
- @measurement.forecast[0].wind.direction.should == "N/A"
203
-
204
- @measurement.forecast[0].sun.rise.to_s.should == "05:43 am"
205
- @measurement.forecast[0].sun.set.to_s.should == "08:00 pm"
206
-
207
- # night
208
- @measurement.forecast[1].should_not be_nil
209
- @measurement.forecast[1].valid_start_date.should == Date.parse("Jun 1 7:00 pm")
210
- @measurement.forecast[1].valid_end_date.should == Date.parse("Jun 2 6:59:59 am")
211
- @measurement.forecast[1].condition.should == "Clear"
212
- @measurement.forecast[1].icon.should == "31"
213
- @measurement.forecast[1].pop.to_i.should == 0
214
- @measurement.forecast[1].humidity.to_i.should == 62
215
-
216
- @measurement.forecast[1].wind.should_not be_nil
217
- @measurement.forecast[1].wind.to_i.should == 16
218
- @measurement.forecast[1].wind.degrees.to_i.should == 343
219
- @measurement.forecast[1].wind.direction.should == "NNW"
220
- end
221
-
222
- end
223
-
224
- end