gull 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/gull/alert.rb +6 -1
- data/lib/gull/version.rb +1 -1
- data/spec/alert_spec.rb +1 -0
- data/spec/fixtures/alerts.xml +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7cf5f89f2aa7403966ecb221648242d55cb0ce0
|
4
|
+
data.tar.gz: 17a287cd6e61951cac00706ec4bd611bed4f87e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 315ae3c06f02a5a155f3c614bbd4ed6f532a81cd973526ee001cb62c303cae3cd50a6b65380b9185273da7e6ec57f83a04dda09246ed13118af904b64f2c4813
|
7
|
+
data.tar.gz: 68c3b8ad903322414850c62c4071cbbf7402ca4175aaf37c8ef6a6104bd8cd43860c49a684b736c5728064e540e5ced86550e5073d9d5abe667821aef46749f7
|
data/CHANGELOG.md
CHANGED
data/lib/gull/alert.rb
CHANGED
@@ -61,11 +61,16 @@ module Gull
|
|
61
61
|
self.id = element.css('id').inner_text
|
62
62
|
self.title = element.css('title').inner_text
|
63
63
|
self.summary = element.css('summary').inner_text
|
64
|
-
self.link = element
|
64
|
+
self.link = parse_link element
|
65
65
|
self.alert_type = element.xpath('cap:event').inner_text
|
66
66
|
self.area = element.xpath('cap:areaDesc').inner_text
|
67
67
|
end
|
68
68
|
|
69
|
+
def parse_link(element)
|
70
|
+
link = element.css('link').first
|
71
|
+
link.attributes['href'].value unless link.nil?
|
72
|
+
end
|
73
|
+
|
69
74
|
def parse_times(element)
|
70
75
|
self.updated_at = Time.parse(element.css('updated').inner_text)
|
71
76
|
self.published_at = Time.parse(element.css('published').inner_text)
|
data/lib/gull/version.rb
CHANGED
data/spec/alert_spec.rb
CHANGED
data/spec/fixtures/alerts.xml
CHANGED
@@ -100,7 +100,6 @@ xmlns:ha = 'http://www.alerting.net/namespace/index_1.0'
|
|
100
100
|
<name>w-nws.webmaster@noaa.gov</name>
|
101
101
|
</author>
|
102
102
|
<title>Heat Advisory issued October 01 at 8:40AM PDT until October 03 at 9:00PM PDT by NWS</title>
|
103
|
-
<link href='http://alerts.weather.gov/cap/wwacapget.php?x=CA125171381DD0.HeatAdvisory.125171642740CA.MTRNPWMTR.64d60221994d798a87b4862623e0d63c'/>
|
104
103
|
<summary>...VERY WARM WEATHER EXPECTED ACROSS OUR ENTIRE AREA STARTING ON THURSDAY... .A RIDGE OF HIGH PRESSURE COMBINED WITH OFFSHORE WINDS AND WARM TEMPERATURES WILL LEAD TO MUCH ABOVE NORMAL TEMPERATURES ACROSS OUR AREA.. ...HEAT ADVISORY IN EFFECT FROM NOON THURSDAY TO 9 PM PDT FRIDAY...</summary>
|
105
104
|
<cap:event>Tornado Warning</cap:event>
|
106
105
|
<cap:effective>2014-10-01T08:40:00-07:00</cap:effective>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gull
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Deckard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|