weather_fetcher 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +8 -1
- data/VERSION +1 -1
- data/lib/weather_fetcher/providers/html_based/open_weather_map.rb +2 -0
- data/lib/weather_fetcher/providers/provider.rb +16 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3667f7b49205868dcd39db647197ddec0517d4a2
|
4
|
+
data.tar.gz: 03de40feb2699f5894e3fb5db7c57bad39107912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381cabb43fbb0165d390f7b9c42f96494a573a57504c8da00468c25f078d904e2a5bf6e935505f37579c81032670f7de22b6cb14a96a42c3f381a8b32d0d3c65
|
7
|
+
data.tar.gz: b3d173d670ca30a6c1d746f784720d0dd9339af297f9e819a02f144a3053d292807ac12e2226a296bb3666e1ae56e5879cc44bdb160fd69e66b6ef8216b0acaf
|
data/README.rdoc
CHANGED
@@ -41,7 +41,14 @@ Please check spec/fetcher_spec.rb for code sample, and spec/fixtures/main.yml fo
|
|
41
41
|
* Interia.pl
|
42
42
|
* WorldWeatherOnline (free api key required)
|
43
43
|
* and 4 metar providers
|
44
|
-
|
44
|
+
|
45
|
+
|
46
|
+
== TODO
|
47
|
+
|
48
|
+
* http://api.yr.no/weatherapi/documentation
|
49
|
+
* http://dataapi.wxc.com/pointrequest.html
|
50
|
+
* http://www.wunderground.com/weather/api/
|
51
|
+
|
45
52
|
== Contributing to weather_fetcher
|
46
53
|
|
47
54
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -46,16 +46,25 @@ module WeatherFetcher
|
|
46
46
|
end
|
47
47
|
|
48
48
|
# Fetch everything from definitions (defs)
|
49
|
-
def fetch
|
49
|
+
def fetch(ignore_errors: true)
|
50
50
|
a = Array.new
|
51
51
|
defs.each do |d|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
pw
|
56
|
-
|
52
|
+
begin
|
53
|
+
p = fetch_and_process_single(d)
|
54
|
+
p = [] if p.nil?
|
55
|
+
p.each do |pw|
|
56
|
+
pw.just_fetched!
|
57
|
+
pw.next_within!(self.class.weather_updated_every)
|
58
|
+
end
|
59
|
+
|
60
|
+
rescue => e
|
61
|
+
if ignore_errors
|
62
|
+
puts e.inspect
|
63
|
+
puts e.backtrace
|
64
|
+
else
|
65
|
+
raise e
|
66
|
+
end
|
57
67
|
end
|
58
|
-
|
59
68
|
a += p unless p.nil?
|
60
69
|
end
|
61
70
|
# add to result array
|