gull 0.4.0 → 1.0.1
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 +5 -5
- data/.github/workflows/ci.yml +23 -0
- data/.gitignore +5 -21
- data/.rubocop.yml +34 -1
- data/CHANGELOG.md +9 -1
- data/Gemfile +2 -0
- data/Guardfile +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +41 -25
- data/Rakefile +2 -0
- data/gull.gemspec +19 -11
- data/lib/gull/alert.rb +79 -45
- data/lib/gull/client.rb +51 -36
- data/lib/gull/error.rb +5 -0
- data/lib/gull/geocode.rb +5 -0
- data/lib/gull/polygon.rb +11 -27
- data/lib/gull/version.rb +3 -1
- data/lib/gull.rb +10 -3
- data/spec/alert_spec.rb +130 -72
- data/spec/client_spec.rb +46 -63
- data/spec/error_spec.rb +4 -2
- data/spec/fixtures/alerts.json +4881 -0
- data/spec/fixtures/empty.json +4 -0
- data/spec/fixtures/features/blizzard_warning.json +93 -0
- data/spec/fixtures/features/empty_geocode.json +34 -0
- data/spec/fixtures/features/flood_advisory.json +156 -0
- data/spec/fixtures/features/flood_warning.json +108 -0
- data/spec/fixtures/features/missing_times.json +36 -0
- data/spec/fixtures/features/multipolygon.json +69 -0
- data/spec/fixtures/features/null_geometry.json +145 -0
- data/spec/fixtures/features/polygon_no_vtec.json +165 -0
- data/spec/fixtures/features/polygon_with_vtec.json +128 -0
- data/spec/fixtures/missing_event.json +21 -0
- data/spec/polygon_spec.rb +22 -34
- data/spec/spec_helper.rb +5 -88
- metadata +42 -42
- data/.hound.yml +0 -3
- data/.ruby-version +0 -1
- data/.travis.yml +0 -7
- data/spec/fixtures/alerts.xml +0 -118
- data/spec/fixtures/bad.xml +0 -1
- data/spec/fixtures/empty.xml +0 -30
- data/spec/fixtures/missing_cap.xml +0 -46
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.116c03c45241f7d902fc876c32d9077690f39444.001.1",
|
|
3
|
+
"type": "Feature",
|
|
4
|
+
"geometry": {
|
|
5
|
+
"type": "Polygon",
|
|
6
|
+
"coordinates": [
|
|
7
|
+
[
|
|
8
|
+
[
|
|
9
|
+
-93.93,
|
|
10
|
+
34.21
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
-93.93,
|
|
14
|
+
34.19
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
-93.82,
|
|
18
|
+
34.18
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
-93.82,
|
|
22
|
+
34.01
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
-93.75,
|
|
26
|
+
34.01
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
-93.68,
|
|
30
|
+
33.98
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
-93.65,
|
|
34
|
+
33.98
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
-93.62,
|
|
38
|
+
33.96
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
-93.59,
|
|
42
|
+
33.96
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
-93.54,
|
|
46
|
+
33.95
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
-93.53,
|
|
50
|
+
33.95
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
-93.53,
|
|
54
|
+
33.94
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
-93.47,
|
|
58
|
+
33.96
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
-93.46,
|
|
62
|
+
33.96
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
-93.46,
|
|
66
|
+
33.95
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
-94,
|
|
70
|
+
33.85
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
-94.13,
|
|
74
|
+
33.99
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
-93.93,
|
|
78
|
+
34.21
|
|
79
|
+
]
|
|
80
|
+
]
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"properties": {
|
|
84
|
+
"@id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.116c03c45241f7d902fc876c32d9077690f39444.001.1",
|
|
85
|
+
"@type": "wx:Alert",
|
|
86
|
+
"id": "urn:oid:2.49.0.1.840.0.116c03c45241f7d902fc876c32d9077690f39444.001.1",
|
|
87
|
+
"areaDesc": "Sevier; Howard; Hempstead",
|
|
88
|
+
"geocode": {
|
|
89
|
+
"SAME": [
|
|
90
|
+
"005133",
|
|
91
|
+
"005061",
|
|
92
|
+
"005057"
|
|
93
|
+
],
|
|
94
|
+
"UGC": [
|
|
95
|
+
"ARZ050",
|
|
96
|
+
"ARZ051",
|
|
97
|
+
"ARZ060"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"affectedZones": [
|
|
101
|
+
"https://api.weather.gov/zones/forecast/ARZ050",
|
|
102
|
+
"https://api.weather.gov/zones/forecast/ARZ051",
|
|
103
|
+
"https://api.weather.gov/zones/forecast/ARZ060"
|
|
104
|
+
],
|
|
105
|
+
"references": [],
|
|
106
|
+
"sent": "2026-03-07T07:48:00-06:00",
|
|
107
|
+
"effective": "2026-03-07T07:48:00-06:00",
|
|
108
|
+
"onset": "2026-03-07T07:48:00-06:00",
|
|
109
|
+
"expires": "2026-03-07T08:15:00-06:00",
|
|
110
|
+
"ends": null,
|
|
111
|
+
"status": "Actual",
|
|
112
|
+
"messageType": "Alert",
|
|
113
|
+
"category": "Met",
|
|
114
|
+
"severity": "Moderate",
|
|
115
|
+
"certainty": "Observed",
|
|
116
|
+
"urgency": "Expected",
|
|
117
|
+
"event": "Special Weather Statement",
|
|
118
|
+
"sender": "w-nws.webmaster@noaa.gov",
|
|
119
|
+
"senderName": "NWS Shreveport LA",
|
|
120
|
+
"headline": "Special Weather Statement issued March 7 at 7:48AM CST by NWS Shreveport LA",
|
|
121
|
+
"description": "At 748 AM CST, Doppler radar was tracking a strong thunderstorm 8\nmiles southwest of Center Point, or 7 miles northwest of Mineral\nSprings, moving northeast at 40 mph.\n\nHAZARD...Wind gusts up to 40 mph and half inch size hail.\n\nSOURCE...Radar indicated.\n\nIMPACT...Gusty winds could knock down tree limbs and blow around\nunsecured objects. Minor damage to outdoor objects is\npossible.\n\nLocations impacted include...\nNashville, Mineral Springs, Dierks, Corinth, Center Point,\nMcCaskill, Muddy Fork and Silver Ridge.",
|
|
122
|
+
"instruction": "Monitor the weather situation closely and be alert for threatening\nweather conditions.",
|
|
123
|
+
"response": "Execute",
|
|
124
|
+
"parameters": {
|
|
125
|
+
"AWIPSidentifier": [
|
|
126
|
+
"SPSSHV"
|
|
127
|
+
],
|
|
128
|
+
"WMOidentifier": [
|
|
129
|
+
"WWUS84 KSHV 071348"
|
|
130
|
+
],
|
|
131
|
+
"NWSheadline": [
|
|
132
|
+
"A STRONG THUNDERSTORM WILL IMPACT NORTHEASTERN HEMPSTEAD... SOUTHEASTERN HOWARD AND EAST CENTRAL SEVIER COUNTIES UNTIL 815 AM CST"
|
|
133
|
+
],
|
|
134
|
+
"eventMotionDescription": [
|
|
135
|
+
"2026-03-07T13:48:00-00:00...storm...233DEG...33KT...33.95,-94.02"
|
|
136
|
+
],
|
|
137
|
+
"maxWindGust": [
|
|
138
|
+
"40 MPH"
|
|
139
|
+
],
|
|
140
|
+
"maxHailSize": [
|
|
141
|
+
"0.50"
|
|
142
|
+
],
|
|
143
|
+
"BLOCKCHANNEL": [
|
|
144
|
+
"EAS",
|
|
145
|
+
"NWEM",
|
|
146
|
+
"CMAS"
|
|
147
|
+
],
|
|
148
|
+
"EAS-ORG": [
|
|
149
|
+
"WXR"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"scope": "Public",
|
|
153
|
+
"code": "IPAWSv1.0",
|
|
154
|
+
"language": "en-US",
|
|
155
|
+
"web": "http://www.weather.gov",
|
|
156
|
+
"eventCode": {
|
|
157
|
+
"SAME": [
|
|
158
|
+
"SPS"
|
|
159
|
+
],
|
|
160
|
+
"NationalWeatherService": [
|
|
161
|
+
"SPS"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.6fd19dc0ecfb760f9e79d1311c993a4fc1760ec4.001.1",
|
|
3
|
+
"type": "Feature",
|
|
4
|
+
"geometry": {
|
|
5
|
+
"type": "Polygon",
|
|
6
|
+
"coordinates": [
|
|
7
|
+
[
|
|
8
|
+
[
|
|
9
|
+
-91.75,
|
|
10
|
+
35.85
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
-91.82,
|
|
14
|
+
35.99
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
-91.25,
|
|
18
|
+
36.29
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
-91.03,
|
|
22
|
+
36.05
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
-91.75,
|
|
26
|
+
35.85
|
|
27
|
+
]
|
|
28
|
+
]
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"properties": {
|
|
32
|
+
"@id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.6fd19dc0ecfb760f9e79d1311c993a4fc1760ec4.001.1",
|
|
33
|
+
"@type": "wx:Alert",
|
|
34
|
+
"id": "urn:oid:2.49.0.1.840.0.6fd19dc0ecfb760f9e79d1311c993a4fc1760ec4.001.1",
|
|
35
|
+
"areaDesc": "Independence, AR; Izard, AR; Lawrence, AR; Randolph, AR; Sharp, AR",
|
|
36
|
+
"geocode": {
|
|
37
|
+
"SAME": [
|
|
38
|
+
"005063",
|
|
39
|
+
"005065",
|
|
40
|
+
"005075",
|
|
41
|
+
"005121",
|
|
42
|
+
"005135"
|
|
43
|
+
],
|
|
44
|
+
"UGC": [
|
|
45
|
+
"ARC063",
|
|
46
|
+
"ARC065",
|
|
47
|
+
"ARC075",
|
|
48
|
+
"ARC121",
|
|
49
|
+
"ARC135"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"affectedZones": [
|
|
53
|
+
"https://api.weather.gov/zones/county/ARC063",
|
|
54
|
+
"https://api.weather.gov/zones/county/ARC065",
|
|
55
|
+
"https://api.weather.gov/zones/county/ARC075",
|
|
56
|
+
"https://api.weather.gov/zones/county/ARC121",
|
|
57
|
+
"https://api.weather.gov/zones/county/ARC135"
|
|
58
|
+
],
|
|
59
|
+
"references": [],
|
|
60
|
+
"sent": "2026-03-07T07:28:00-06:00",
|
|
61
|
+
"effective": "2026-03-07T07:28:00-06:00",
|
|
62
|
+
"onset": "2026-03-07T07:28:00-06:00",
|
|
63
|
+
"expires": "2026-03-07T08:15:00-06:00",
|
|
64
|
+
"ends": "2026-03-07T08:15:00-06:00",
|
|
65
|
+
"status": "Actual",
|
|
66
|
+
"messageType": "Alert",
|
|
67
|
+
"category": "Met",
|
|
68
|
+
"severity": "Severe",
|
|
69
|
+
"certainty": "Observed",
|
|
70
|
+
"urgency": "Immediate",
|
|
71
|
+
"event": "Severe Thunderstorm Warning",
|
|
72
|
+
"sender": "w-nws.webmaster@noaa.gov",
|
|
73
|
+
"senderName": "NWS Little Rock AR",
|
|
74
|
+
"headline": "Severe Thunderstorm Warning issued March 7 at 7:28AM CST until March 7 at 8:15AM CST by NWS Little Rock AR",
|
|
75
|
+
"description": "SVRLZK\n\nThe National Weather Service in Little Rock has issued a\n\n* Severe Thunderstorm Warning for...\nNorthwestern Independence County in north central Arkansas...\nSouth central Randolph County in eastern Arkansas...\nSoutheastern Izard County in north central Arkansas...\nNorthwestern Lawrence County in eastern Arkansas...\nSouthern Sharp County in north central Arkansas...\n\n* Until 815 AM CST.\n\n* At 728 AM CST, a severe thunderstorm was located over Sidney, or 12\nmiles southeast of Melbourne, moving east at 50 mph.\n\nHAZARD...60 mph wind gusts.\n\nSOURCE...Radar indicated.\n\nIMPACT...Expect damage to roofs, siding, and trees.\n\n* Locations impacted include...\nBlack Rock... Lake Charles State Park...\nCave City... Imboden...\nRavenden... Cushman...\nPortia... Mount Pleasant...\nStrawberry... Lynn...\nSidney... Annieville...\nStella... Evening Shade...\nSmithville... Powhatan...\nAetna... Calamine...\nNelsonville... Sitka...",
|
|
76
|
+
"instruction": "A Tornado Watch remains in effect until 800 AM CST for north central\nArkansas.\n\nFor your protection move to an interior room on the lowest floor of a\nbuilding.\n\nA Tornado Watch remains in effect until 800 AM CST for north central\nArkansas.",
|
|
77
|
+
"response": "Shelter",
|
|
78
|
+
"parameters": {
|
|
79
|
+
"AWIPSidentifier": [
|
|
80
|
+
"SVRLZK"
|
|
81
|
+
],
|
|
82
|
+
"WMOidentifier": [
|
|
83
|
+
"WUUS54 KLZK 071328"
|
|
84
|
+
],
|
|
85
|
+
"eventMotionDescription": [
|
|
86
|
+
"2026-03-07T13:28:00-00:00...storm...248DEG...42KT...35.97,-91.69"
|
|
87
|
+
],
|
|
88
|
+
"windThreat": [
|
|
89
|
+
"RADAR INDICATED"
|
|
90
|
+
],
|
|
91
|
+
"maxWindGust": [
|
|
92
|
+
"60 MPH"
|
|
93
|
+
],
|
|
94
|
+
"hailThreat": [
|
|
95
|
+
"RADAR INDICATED"
|
|
96
|
+
],
|
|
97
|
+
"maxHailSize": [
|
|
98
|
+
"Up to .75"
|
|
99
|
+
],
|
|
100
|
+
"BLOCKCHANNEL": [
|
|
101
|
+
"EAS",
|
|
102
|
+
"NWEM",
|
|
103
|
+
"CMAS"
|
|
104
|
+
],
|
|
105
|
+
"EAS-ORG": [
|
|
106
|
+
"WXR"
|
|
107
|
+
],
|
|
108
|
+
"VTEC": [
|
|
109
|
+
"/O.NEW.KLZK.SV.W.0013.260307T1328Z-260307T1415Z/"
|
|
110
|
+
],
|
|
111
|
+
"eventEndingTime": [
|
|
112
|
+
"2026-03-07T08:15:00-06:00"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"scope": "Public",
|
|
116
|
+
"code": "IPAWSv1.0",
|
|
117
|
+
"language": "en-US",
|
|
118
|
+
"web": "http://www.weather.gov",
|
|
119
|
+
"eventCode": {
|
|
120
|
+
"SAME": [
|
|
121
|
+
"SVR"
|
|
122
|
+
],
|
|
123
|
+
"NationalWeatherService": [
|
|
124
|
+
"SVW"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "FeatureCollection",
|
|
3
|
+
"features": [
|
|
4
|
+
{
|
|
5
|
+
"id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.9999",
|
|
6
|
+
"type": "Feature",
|
|
7
|
+
"geometry": null,
|
|
8
|
+
"properties": {
|
|
9
|
+
"@id": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.9999",
|
|
10
|
+
"id": "urn:oid:2.49.0.1.840.0.9999",
|
|
11
|
+
"areaDesc": "Some area",
|
|
12
|
+
"event": null,
|
|
13
|
+
"headline": "Test",
|
|
14
|
+
"description": "Test",
|
|
15
|
+
"sent": "2014-10-01T08:40:00-07:00",
|
|
16
|
+
"effective": "2014-10-01T08:40:00-07:00",
|
|
17
|
+
"expires": "2014-10-03T21:00:00-07:00"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
data/spec/polygon_spec.rb
CHANGED
|
@@ -1,45 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe Gull::Polygon do
|
|
4
|
-
it 'should return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
expect(url).to eq expected_url
|
|
16
|
-
|
|
17
|
-
url = polygon.image_url api_key
|
|
18
|
-
expected_url = 'http://maps.googleapis.com/maps/api/staticmap?' \
|
|
19
|
-
'size=640x640&maptype=roadmap&path=color:0xff0000' \
|
|
20
|
-
'|weight:3|fillcolor:0xff000060|34.57,-97.56|34.77,-97.38|34.75,-97.17' \
|
|
21
|
-
'&key=testkey'
|
|
22
|
-
expect(url).to eq expected_url
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it 'should return original string representation' do
|
|
26
|
-
text = '34.57,-97.56 34.77,-97.38 34.75,-97.17 ' \
|
|
27
|
-
'34.64,-97.11 34.64,-97.14 34.62,-97.14 34.62,-97.2 34.6,-97.19 34.59,' \
|
|
28
|
-
'-97.17 34.57,-97.17 34.5,-97.3 34.51,-97.56 34.57,-97.56'
|
|
29
|
-
polygon = Gull::Polygon.new text
|
|
30
|
-
expect(polygon.to_s).to eq text
|
|
6
|
+
it 'should return string representation' do
|
|
7
|
+
coords = [[-97.56, 34.57], [-97.38, 34.77], [-97.17, 34.75],
|
|
8
|
+
[-97.11, 34.64], [-97.14, 34.64], [-97.14, 34.62],
|
|
9
|
+
[-97.2, 34.62], [-97.19, 34.6], [-97.17, 34.59],
|
|
10
|
+
[-97.17, 34.57], [-97.3, 34.5], [-97.56, 34.51],
|
|
11
|
+
[-97.56, 34.57]]
|
|
12
|
+
polygon = Gull::Polygon.new coords
|
|
13
|
+
expected = '34.57,-97.56 34.77,-97.38 34.75,-97.17 ' \
|
|
14
|
+
'34.64,-97.11 34.64,-97.14 34.62,-97.14 34.62,-97.2 34.6,-97.19 34.59,' \
|
|
15
|
+
'-97.17 34.57,-97.17 34.5,-97.3 34.51,-97.56 34.57,-97.56'
|
|
16
|
+
expect(polygon.to_s).to eq expected
|
|
31
17
|
end
|
|
32
18
|
|
|
33
19
|
it 'should output polygons in WKT format' do
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
coords = [[-97.56, 34.57], [-97.38, 34.77], [-97.17, 34.75],
|
|
21
|
+
[-97.11, 34.64], [-97.14, 34.64], [-97.14, 34.62],
|
|
22
|
+
[-97.2, 34.62], [-97.19, 34.6], [-97.17, 34.59],
|
|
23
|
+
[-97.17, 34.57], [-97.3, 34.5], [-97.56, 34.51],
|
|
24
|
+
[-97.56, 34.57]]
|
|
25
|
+
polygon = Gull::Polygon.new coords
|
|
37
26
|
|
|
38
|
-
wkt_text = 'POLYGON((-97.56 34.57, -97.38 34.77, -97.17 34.75,' \
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
wkt_text = 'POLYGON((-97.56 34.57, -97.38 34.77, -97.17 34.75, ' \
|
|
28
|
+
'-97.11 34.64, -97.14 34.64, -97.14 34.62, -97.2 34.62, -97.19 34.6, ' \
|
|
29
|
+
'-97.17 34.59, -97.17 34.57, -97.3 34.5, -97.56 34.51, -97.56 34.57))'
|
|
41
30
|
|
|
42
|
-
polygon = Gull::Polygon.new text
|
|
43
31
|
expect(polygon.to_wkt).to eq wkt_text
|
|
44
32
|
end
|
|
45
33
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,100 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
require 'coveralls'
|
|
3
|
-
require 'simplecov'
|
|
4
|
-
require 'webmock/rspec'
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
SimpleCov::Formatter::HTMLFormatter,
|
|
8
|
-
Coveralls::SimpleCov::Formatter
|
|
9
|
-
])
|
|
3
|
+
require 'simplecov'
|
|
10
4
|
SimpleCov.start
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# file to always be loaded, without a need to explicitly require it in any files.
|
|
16
|
-
#
|
|
17
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
|
18
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
|
19
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
|
20
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
|
21
|
-
# a separate helper file that requires the additional dependencies and performs
|
|
22
|
-
# the additional setup, and require it from the spec files that actually need it.
|
|
23
|
-
#
|
|
24
|
-
# The `.rspec` file also contains a few flags that are not defaults but that
|
|
25
|
-
# users commonly want.
|
|
26
|
-
#
|
|
27
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
|
6
|
+
require 'gull'
|
|
7
|
+
require 'webmock/rspec'
|
|
8
|
+
|
|
28
9
|
RSpec.configure do |config|
|
|
29
|
-
# rspec-expectations config goes here. You can use an alternate
|
|
30
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
|
31
|
-
# assertions if you prefer.
|
|
32
10
|
config.expect_with :rspec do |expectations|
|
|
33
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
|
34
|
-
# and `failure_message` of custom matchers include text for helper methods
|
|
35
|
-
# defined using `chain`, e.g.:
|
|
36
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
|
37
|
-
# # => "be bigger than 2 and smaller than 4"
|
|
38
|
-
# ...rather than:
|
|
39
|
-
# # => "be bigger than 2"
|
|
40
11
|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
41
12
|
end
|
|
42
13
|
|
|
43
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
|
44
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
|
45
14
|
config.mock_with :rspec do |mocks|
|
|
46
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
|
47
|
-
# a real object. This is generally recommended, and will default to
|
|
48
|
-
# `true` in RSpec 4.
|
|
49
15
|
mocks.verify_partial_doubles = true
|
|
50
16
|
end
|
|
51
|
-
|
|
52
|
-
# The settings below are suggested to provide a good initial experience
|
|
53
|
-
# with RSpec, but feel free to customize to your heart's content.
|
|
54
|
-
=begin
|
|
55
|
-
# These two settings work together to allow you to limit a spec run
|
|
56
|
-
# to individual examples or groups you care about by tagging them with
|
|
57
|
-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
|
58
|
-
# get run.
|
|
59
|
-
config.filter_run :focus
|
|
60
|
-
config.run_all_when_everything_filtered = true
|
|
61
|
-
|
|
62
|
-
# Limits the available syntax to the non-monkey patched syntax that is recommended.
|
|
63
|
-
# For more details, see:
|
|
64
|
-
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
|
65
|
-
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
|
66
|
-
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
|
67
|
-
config.disable_monkey_patching!
|
|
68
|
-
|
|
69
|
-
# This setting enables warnings. It's recommended, but in some cases may
|
|
70
|
-
# be too noisy due to issues in dependencies.
|
|
71
|
-
config.warnings = true
|
|
72
|
-
|
|
73
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
|
74
|
-
# file, and it's useful to allow more verbose output when running an
|
|
75
|
-
# individual spec file.
|
|
76
|
-
if config.files_to_run.one?
|
|
77
|
-
# Use the documentation formatter for detailed output,
|
|
78
|
-
# unless a formatter has already been configured
|
|
79
|
-
# (e.g. via a command-line flag).
|
|
80
|
-
config.default_formatter = 'doc'
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Print the 10 slowest examples and example groups at the
|
|
84
|
-
# end of the spec run, to help surface which specs are running
|
|
85
|
-
# particularly slow.
|
|
86
|
-
config.profile_examples = 10
|
|
87
|
-
|
|
88
|
-
# Run specs in random order to surface order dependencies. If you find an
|
|
89
|
-
# order dependency and want to debug it, you can fix the order by providing
|
|
90
|
-
# the seed, which is printed after each run.
|
|
91
|
-
# --seed 1234
|
|
92
|
-
config.order = :random
|
|
93
|
-
|
|
94
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
|
95
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
|
96
|
-
# test failures related to randomization by passing the same `--seed` value
|
|
97
|
-
# as the one that triggered the failure.
|
|
98
|
-
Kernel.srand config.seed
|
|
99
|
-
=end
|
|
100
17
|
end
|
metadata
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gull
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Seth Deckard
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
|
-
type: :
|
|
20
|
+
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
@@ -25,21 +25,21 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: guard-rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
34
|
-
type: :
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,35 +53,35 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
61
|
+
version: '3.0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
68
|
+
version: '3.0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: rubocop
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: rubocop-rake
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: simplecov
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
@@ -122,19 +122,18 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
-
description:
|
|
125
|
+
description: Fetches and parses NOAA/NWS alerts, warnings, and watches from api.weather.gov.
|
|
126
|
+
Zero runtime dependencies.
|
|
126
127
|
email:
|
|
127
128
|
- seth@deckard.me
|
|
128
129
|
executables: []
|
|
129
130
|
extensions: []
|
|
130
131
|
extra_rdoc_files: []
|
|
131
132
|
files:
|
|
133
|
+
- ".github/workflows/ci.yml"
|
|
132
134
|
- ".gitignore"
|
|
133
|
-
- ".hound.yml"
|
|
134
135
|
- ".rspec"
|
|
135
136
|
- ".rubocop.yml"
|
|
136
|
-
- ".ruby-version"
|
|
137
|
-
- ".travis.yml"
|
|
138
137
|
- CHANGELOG.md
|
|
139
138
|
- Gemfile
|
|
140
139
|
- Guardfile
|
|
@@ -152,17 +151,28 @@ files:
|
|
|
152
151
|
- spec/alert_spec.rb
|
|
153
152
|
- spec/client_spec.rb
|
|
154
153
|
- spec/error_spec.rb
|
|
155
|
-
- spec/fixtures/alerts.
|
|
156
|
-
- spec/fixtures/
|
|
157
|
-
- spec/fixtures/
|
|
158
|
-
- spec/fixtures/
|
|
154
|
+
- spec/fixtures/alerts.json
|
|
155
|
+
- spec/fixtures/empty.json
|
|
156
|
+
- spec/fixtures/features/blizzard_warning.json
|
|
157
|
+
- spec/fixtures/features/empty_geocode.json
|
|
158
|
+
- spec/fixtures/features/flood_advisory.json
|
|
159
|
+
- spec/fixtures/features/flood_warning.json
|
|
160
|
+
- spec/fixtures/features/missing_times.json
|
|
161
|
+
- spec/fixtures/features/multipolygon.json
|
|
162
|
+
- spec/fixtures/features/null_geometry.json
|
|
163
|
+
- spec/fixtures/features/polygon_no_vtec.json
|
|
164
|
+
- spec/fixtures/features/polygon_with_vtec.json
|
|
165
|
+
- spec/fixtures/missing_event.json
|
|
159
166
|
- spec/polygon_spec.rb
|
|
160
167
|
- spec/spec_helper.rb
|
|
161
168
|
homepage: https://github.com/sethdeckard/gull
|
|
162
169
|
licenses:
|
|
163
170
|
- MIT
|
|
164
|
-
metadata:
|
|
165
|
-
|
|
171
|
+
metadata:
|
|
172
|
+
source_code_uri: https://github.com/sethdeckard/gull
|
|
173
|
+
changelog_uri: https://github.com/sethdeckard/gull/blob/master/CHANGELOG.md
|
|
174
|
+
bug_tracker_uri: https://github.com/sethdeckard/gull/issues
|
|
175
|
+
post_install_message:
|
|
166
176
|
rdoc_options: []
|
|
167
177
|
require_paths:
|
|
168
178
|
- lib
|
|
@@ -170,25 +180,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
170
180
|
requirements:
|
|
171
181
|
- - ">="
|
|
172
182
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: '
|
|
183
|
+
version: '3.1'
|
|
174
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
185
|
requirements:
|
|
176
186
|
- - ">="
|
|
177
187
|
- !ruby/object:Gem::Version
|
|
178
188
|
version: '0'
|
|
179
189
|
requirements: []
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
signing_key:
|
|
190
|
+
rubygems_version: 3.5.22
|
|
191
|
+
signing_key:
|
|
183
192
|
specification_version: 4
|
|
184
193
|
summary: Client for parsing NOAA/NWS alerts, warnings, and watches.
|
|
185
|
-
test_files:
|
|
186
|
-
- spec/alert_spec.rb
|
|
187
|
-
- spec/client_spec.rb
|
|
188
|
-
- spec/error_spec.rb
|
|
189
|
-
- spec/fixtures/alerts.xml
|
|
190
|
-
- spec/fixtures/bad.xml
|
|
191
|
-
- spec/fixtures/empty.xml
|
|
192
|
-
- spec/fixtures/missing_cap.xml
|
|
193
|
-
- spec/polygon_spec.rb
|
|
194
|
-
- spec/spec_helper.rb
|
|
194
|
+
test_files: []
|
data/.hound.yml
DELETED