noaa-alerts 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- @alerts << Noaa::Alert.new(entry['id'], item)
27
+ alert = Noaa::Alert.new(entry['id'], item)
28
+ @alerts << alert unless alert.description.empty?
28
29
  end
29
30
  end
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module Noaa
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -13,12 +13,13 @@ end
13
13
 
14
14
  describe Noaa, :vcr do
15
15
  describe ".initialize" do
16
- subject { Noaa::Client.new("ny") }
17
-
18
- its(:alerts) { should_not be_empty }
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("ny").alerts.first }
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 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noaa-alerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: