noaa-alerts 0.1.2 → 0.1.3
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.
- data/lib/client.rb +2 -1
- data/lib/noaa-alerts/version.rb +1 -1
- data/spec/noaa_alerts_spec.rb +5 -4
- metadata +1 -1
data/lib/client.rb
CHANGED
@@ -24,7 +24,8 @@ module Noaa
|
|
24
24
|
entries.each do |entry|
|
25
25
|
item = HTTParty.get(entry['id'],
|
26
26
|
format: :xml)['alert']
|
27
|
-
|
27
|
+
alert = Noaa::Alert.new(entry['id'], item)
|
28
|
+
@alerts << alert unless alert.description.empty?
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
data/lib/noaa-alerts/version.rb
CHANGED
data/spec/noaa_alerts_spec.rb
CHANGED
@@ -13,12 +13,13 @@ end
|
|
13
13
|
|
14
14
|
describe Noaa, :vcr do
|
15
15
|
describe ".initialize" do
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
it 'has alerts with non-empty values' do
|
17
|
+
Noaa::Client.new("mn").alerts.should_not be_empty
|
18
|
+
Noaa::Client.new("mn").alerts.each { |alert| alert.description.should_not be_empty }
|
19
|
+
end
|
19
20
|
|
20
21
|
describe Noaa::Alert do
|
21
|
-
subject { Noaa::Client.new("
|
22
|
+
subject { Noaa::Client.new("mn").alerts.first }
|
22
23
|
|
23
24
|
its(:url) { should_not be_empty }
|
24
25
|
its(:event) { should_not be_empty }
|