open-weather 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +5 -0
- data/CONTRIBUTORS.md +17 -0
- data/Gemfile +2 -3
- data/README.md +12 -1
- data/lib/open_weather.rb +7 -7
- data/lib/open_weather/api.rb +46 -8
- data/lib/open_weather/base.rb +18 -14
- data/lib/open_weather/current.rb +1 -1
- data/lib/open_weather/version.rb +1 -1
- data/open_weather.gemspec +8 -7
- data/spec/fixtures/cassettes/api/current_circle_zone_invalid.yml +47 -0
- data/spec/fixtures/cassettes/api/current_circle_zone_valid.yml +122 -0
- data/spec/fixtures/cassettes/api/current_cities_invalid.yml +47 -0
- data/spec/fixtures/cassettes/api/current_cities_valid.yml +47 -0
- data/spec/fixtures/cassettes/api/current_rectangle_zone_invalid.yml +47 -0
- data/spec/fixtures/cassettes/api/current_rectangle_zone_valid.yml +47 -0
- data/spec/fixtures/cassettes/integration/current_by_circle_zone.yml +121 -0
- data/spec/fixtures/cassettes/integration/current_by_cities.yml +47 -0
- data/spec/fixtures/cassettes/integration/current_by_rectangle_zone.yml +91 -0
- data/spec/integration/current_spec.rb +69 -21
- data/spec/open_weather/api_spec.rb +89 -41
- data/spec/open_weather/version_spec.rb +3 -3
- metadata +53 -15
- data/Gemfile.lock +0 -28
@@ -1,55 +1,103 @@
|
|
1
|
-
describe
|
1
|
+
describe 'Current weather information with APPID' do
|
2
2
|
let(:options) do
|
3
|
-
{ units:
|
3
|
+
{ units: 'metric', APPID: 1111111111 }
|
4
4
|
end
|
5
5
|
|
6
|
-
describe
|
7
|
-
context
|
6
|
+
describe 'searching by city' do
|
7
|
+
context 'when the city is found' do
|
8
8
|
let(:weather) do
|
9
|
-
VCR.use_cassette(
|
10
|
-
OpenWeather::Current.city(
|
9
|
+
VCR.use_cassette('integration/current_by_city') do
|
10
|
+
OpenWeather::Current.city('Berlin, DE', options)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
it
|
15
|
-
expect(weather).to include(
|
14
|
+
it 'returns results' do
|
15
|
+
expect(weather).to include('weather')
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
context
|
19
|
+
context 'when the city is not found' do
|
20
20
|
let(:weather) do
|
21
|
-
VCR.use_cassette(
|
22
|
-
OpenWeather::Current.city(
|
21
|
+
VCR.use_cassette('integration/current_not_found_city') do
|
22
|
+
OpenWeather::Current.city('Berlin, DE', options)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
it
|
27
|
-
expect(weather[
|
26
|
+
it 'returns an attribute with code 404' do
|
27
|
+
expect(weather['cod']).to eq('404')
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
describe
|
32
|
+
describe 'searching by geolocation' do
|
33
33
|
let(:weather) do
|
34
|
-
VCR.use_cassette(
|
34
|
+
VCR.use_cassette('integration/current_by_geocode') do
|
35
35
|
OpenWeather::Current.geocode(48.140938, 11.582005, options)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
it
|
40
|
-
expect(weather).to include(
|
39
|
+
it 'returns results' do
|
40
|
+
expect(weather).to include('weather')
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
describe
|
44
|
+
describe 'searching by city_id' do
|
45
45
|
let(:weather) do
|
46
|
-
VCR.use_cassette(
|
46
|
+
VCR.use_cassette('integration/current_by_city_id') do
|
47
47
|
OpenWeather::Current.city_id(524901, options)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
it
|
52
|
-
expect(weather).to include(
|
51
|
+
it 'returns results' do
|
52
|
+
expect(weather).to include('weather')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'searching by city ids' do
|
57
|
+
let(:weather) do
|
58
|
+
VCR.use_cassette('integration/current_by_cities') do
|
59
|
+
OpenWeather::Current.cities([524901, 703448, 2643743], options)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'returns results' do
|
64
|
+
expect(weather).to include('list')
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'returns results as an array' do
|
68
|
+
expect(weather['list']).to be_kind_of(Array)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe 'searching by bounding box' do
|
73
|
+
let(:weather) do
|
74
|
+
VCR.use_cassette('integration/current_by_rectangle_zone') do
|
75
|
+
OpenWeather::Current.rectangle_zone(12, 32, 15, 37, 10, options)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'returns results' do
|
80
|
+
expect(weather).to include('list')
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'returns results as an array' do
|
84
|
+
expect(weather['list']).to be_kind_of(Array)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe 'searching by cycle' do
|
89
|
+
let(:weather) do
|
90
|
+
VCR.use_cassette('integration/current_by_circle_zone') do
|
91
|
+
OpenWeather::Current.circle_zone(55.5, 37.5, 10, options)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'returns results' do
|
96
|
+
expect(weather).to include('list')
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'returns results as an array' do
|
100
|
+
expect(weather['list']).to be_kind_of(Array)
|
53
101
|
end
|
54
102
|
end
|
55
103
|
end
|
@@ -1,60 +1,108 @@
|
|
1
1
|
describe 'Open weather Current API' do
|
2
2
|
context '.city' do
|
3
3
|
it 'return current weather for cochi' do
|
4
|
-
response = VCR.use_cassette(
|
4
|
+
response = VCR.use_cassette('api/current_city_valid') do
|
5
5
|
OpenWeather::Current.city('Cochin, In')
|
6
6
|
end
|
7
7
|
response['cod'].should eq(200)
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'returns error if the city is invalid' do
|
11
|
-
response = VCR.use_cassette(
|
11
|
+
response = VCR.use_cassette('api/current_city_invalid') do
|
12
12
|
OpenWeather::Current.city('Cochiiiiiin, In')
|
13
13
|
end
|
14
|
-
response['cod'].should eq(
|
14
|
+
response['cod'].should eq('404')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
context '.city_id' do
|
19
19
|
it 'return current weather for city id of cochi' do
|
20
|
-
response = VCR.use_cassette(
|
20
|
+
response = VCR.use_cassette('api/current_city_id_valid') do
|
21
21
|
OpenWeather::Current.city_id('1273874')
|
22
22
|
end
|
23
23
|
response['cod'].should eq(200)
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'returns error if the city id is invalid' do
|
27
|
-
response = VCR.use_cassette(
|
27
|
+
response = VCR.use_cassette('api/current_city_id_invalid') do
|
28
28
|
OpenWeather::Current.city('invalidid')
|
29
29
|
end
|
30
|
-
response['cod'].should eq(
|
30
|
+
response['cod'].should eq('404')
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
context '.geocode' do
|
35
35
|
it 'return current weather for geocode of cochi' do
|
36
|
-
response = VCR.use_cassette(
|
36
|
+
response = VCR.use_cassette('api/current_geocode_valid') do
|
37
37
|
OpenWeather::Current.geocode('9.94', '76.26')
|
38
38
|
end
|
39
39
|
response['cod'].should eq(200)
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'returns error if the geocode is invalid' do
|
43
|
-
response = VCR.use_cassette(
|
43
|
+
response = VCR.use_cassette('api/current_geocode_invalid') do
|
44
44
|
OpenWeather::Current.geocode('181', '181')
|
45
45
|
end
|
46
|
-
response['cod'].should eq(
|
46
|
+
response['cod'].should eq('404')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context '.cities' do
|
51
|
+
it 'return current weather for list of cities' do
|
52
|
+
response = VCR.use_cassette('api/current_cities_valid') do
|
53
|
+
OpenWeather::Current.cities([524901, 703448, 2643743])
|
54
|
+
end
|
55
|
+
response['list'].count.should eq(3)
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'return empty list if cities are invalid' do
|
59
|
+
response = VCR.use_cassette('api/current_cities_invalid') do
|
60
|
+
OpenWeather::Current.cities([42, 1000])
|
61
|
+
end
|
62
|
+
response['list'].count.should eq(0)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context '.rectangle_zone' do
|
67
|
+
it 'return current weather for the cities in a bounding box' do
|
68
|
+
response = VCR.use_cassette('api/current_rectangle_zone_valid') do
|
69
|
+
OpenWeather::Current.rectangle_zone(12, 32, 15, 37, 10)
|
70
|
+
end
|
71
|
+
response['list'].count.should eq(15)
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'return empty list if bounding box is invalid' do
|
75
|
+
response = VCR.use_cassette('api/current_rectangle_zone_invalid') do
|
76
|
+
OpenWeather::Current.rectangle_zone(-5, -5, -5, -5, -5)
|
77
|
+
end
|
78
|
+
response['list'].count.should eq(0)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
context '.circle_zone' do
|
83
|
+
it 'return current weather for the cities in cycle' do
|
84
|
+
response = VCR.use_cassette('api/current_circle_zone_valid') do
|
85
|
+
OpenWeather::Current.circle_zone(55.5, 37.5, 10)
|
86
|
+
end
|
87
|
+
response['list'].count.should eq(10)
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'return error if count is negative' do
|
91
|
+
response = VCR.use_cassette('api/current_circle_zone_invalid') do
|
92
|
+
OpenWeather::Current.circle_zone(55.5, 37.5, -10)
|
93
|
+
end
|
94
|
+
response['cod'].should eq("500")
|
47
95
|
end
|
48
96
|
end
|
49
97
|
|
50
98
|
context 'units option' do
|
51
99
|
it 'returns the current temperature in requested units' do
|
52
|
-
response = VCR.use_cassette(
|
100
|
+
response = VCR.use_cassette('api/current_city_metric_valid') do
|
53
101
|
OpenWeather::Current.city('Cochin, In', units: 'metric')
|
54
102
|
end
|
55
103
|
temp_metric = response['main']['temp']
|
56
104
|
|
57
|
-
response = VCR.use_cassette(
|
105
|
+
response = VCR.use_cassette('api/current_city_imperial_valid') do
|
58
106
|
OpenWeather::Current.city('Cochin, In', units: 'imperial')
|
59
107
|
end
|
60
108
|
temp_imperial = response['main']['temp']
|
@@ -68,60 +116,60 @@ end
|
|
68
116
|
describe 'Open weather Forecast API' do
|
69
117
|
context '.city' do
|
70
118
|
it 'return forecast weather for cochi' do
|
71
|
-
response = VCR.use_cassette(
|
119
|
+
response = VCR.use_cassette('api/forecast_city_valid') do
|
72
120
|
OpenWeather::Forecast.city('Cochin, In')
|
73
121
|
end
|
74
|
-
response['cod'].to_s.should eq(
|
122
|
+
response['cod'].to_s.should eq('200')
|
75
123
|
end
|
76
124
|
|
77
125
|
it 'returns error if the city is invalid' do
|
78
|
-
response = VCR.use_cassette(
|
126
|
+
response = VCR.use_cassette('api/forecast_invalid') do
|
79
127
|
OpenWeather::Forecast.city('Cochiiiiiin, In')
|
80
128
|
end
|
81
|
-
response['cod'].to_s.should eq(
|
129
|
+
response['cod'].to_s.should eq('404')
|
82
130
|
end
|
83
131
|
end
|
84
132
|
|
85
133
|
context '.city_id' do
|
86
134
|
it 'return forecast weather for city id of cochi' do
|
87
|
-
response = VCR.use_cassette(
|
135
|
+
response = VCR.use_cassette('api/forecast_city_id_valid') do
|
88
136
|
OpenWeather::Forecast.city_id('1273874')
|
89
137
|
end
|
90
|
-
response['cod'].to_s.should eq(
|
138
|
+
response['cod'].to_s.should eq('200')
|
91
139
|
end
|
92
140
|
|
93
141
|
it 'returns error if the city id is invalid' do
|
94
|
-
response = VCR.use_cassette(
|
142
|
+
response = VCR.use_cassette('api/forecast_city_id_invalid') do
|
95
143
|
OpenWeather::Forecast.city('invalidid')
|
96
144
|
end
|
97
|
-
response['cod'].to_s.should eq(
|
145
|
+
response['cod'].to_s.should eq('404')
|
98
146
|
end
|
99
147
|
end
|
100
148
|
|
101
149
|
context '.geocode' do
|
102
150
|
it 'return forecast weather for geocode of cochi' do
|
103
|
-
response = VCR.use_cassette(
|
151
|
+
response = VCR.use_cassette('api/forecast_geocode_valid') do
|
104
152
|
OpenWeather::Forecast.geocode('9.94', '76.26')
|
105
153
|
end
|
106
|
-
response['cod'].to_s.should eq(
|
154
|
+
response['cod'].to_s.should eq('200')
|
107
155
|
end
|
108
156
|
|
109
157
|
it 'returns error if the geocode is invalid' do
|
110
|
-
response = VCR.use_cassette(
|
158
|
+
response = VCR.use_cassette('api/forecast_geocode_invalid') do
|
111
159
|
OpenWeather::Forecast.geocode('181', '181')
|
112
160
|
end
|
113
|
-
response['cod'].to_s.should eq(
|
161
|
+
response['cod'].to_s.should eq('404')
|
114
162
|
end
|
115
163
|
end
|
116
164
|
|
117
165
|
context 'units option' do
|
118
166
|
it 'returns the forecast in requested units' do
|
119
|
-
response = VCR.use_cassette(
|
167
|
+
response = VCR.use_cassette('api/forecast_city_metric_valid') do
|
120
168
|
OpenWeather::Forecast.city('Cochin, In', units: 'metric')
|
121
169
|
end
|
122
170
|
temp_metric = response['list'].first['main']['temp']
|
123
171
|
|
124
|
-
response = VCR.use_cassette(
|
172
|
+
response = VCR.use_cassette('api/forecast_city_imperial_valid') do
|
125
173
|
OpenWeather::Forecast.city('Cochin, In', units: 'imperial')
|
126
174
|
end
|
127
175
|
temp_imperial = response['list'].first['main']['temp']
|
@@ -135,60 +183,60 @@ end
|
|
135
183
|
describe 'Open weather Forecast Daily API' do
|
136
184
|
context '.city' do
|
137
185
|
it 'return forecast weather for cochi' do
|
138
|
-
response = VCR.use_cassette(
|
186
|
+
response = VCR.use_cassette('api/forecast_daily_city_valid') do
|
139
187
|
OpenWeather::ForecastDaily.city('Cochin, In')
|
140
188
|
end
|
141
|
-
response['cod'].to_s.should eq(
|
189
|
+
response['cod'].to_s.should eq('200')
|
142
190
|
end
|
143
191
|
|
144
192
|
it 'returns error if the city is invalid' do
|
145
|
-
response = VCR.use_cassette(
|
193
|
+
response = VCR.use_cassette('api/forecast_daily_invalid') do
|
146
194
|
OpenWeather::ForecastDaily.city('Cochiiiiiin, In')
|
147
195
|
end
|
148
|
-
response['cod'].to_s.should eq(
|
196
|
+
response['cod'].to_s.should eq('404')
|
149
197
|
end
|
150
198
|
end
|
151
199
|
|
152
200
|
context '.city_id' do
|
153
201
|
it 'return forecast weather for city id of cochi' do
|
154
|
-
response = VCR.use_cassette(
|
202
|
+
response = VCR.use_cassette('api/forecast_daily_city_id_valid') do
|
155
203
|
OpenWeather::ForecastDaily.city_id('1273874')
|
156
204
|
end
|
157
|
-
response['cod'].to_s.should eq(
|
205
|
+
response['cod'].to_s.should eq('200')
|
158
206
|
end
|
159
207
|
|
160
208
|
it 'returns error if the city id is invalid' do
|
161
|
-
response = VCR.use_cassette(
|
209
|
+
response = VCR.use_cassette('api/forecast_daily_city_id_invalid') do
|
162
210
|
OpenWeather::ForecastDaily.city('invalidid')
|
163
211
|
end
|
164
|
-
response['cod'].to_s.should eq(
|
212
|
+
response['cod'].to_s.should eq('404')
|
165
213
|
end
|
166
214
|
end
|
167
215
|
|
168
216
|
context '.geocode' do
|
169
217
|
it 'return forecast weather for geocode of cochi' do
|
170
|
-
response = VCR.use_cassette(
|
218
|
+
response = VCR.use_cassette('api/forecast_daily_geocode_valid') do
|
171
219
|
OpenWeather::ForecastDaily.geocode('9.94', '76.26')
|
172
220
|
end
|
173
|
-
response['cod'].to_s.should eq(
|
221
|
+
response['cod'].to_s.should eq('200')
|
174
222
|
end
|
175
223
|
|
176
224
|
it 'returns error if the geocode is invalid' do
|
177
|
-
response = VCR.use_cassette(
|
225
|
+
response = VCR.use_cassette('api/forecast_daily_geocode_invalid') do
|
178
226
|
OpenWeather::ForecastDaily.geocode('181', '181')
|
179
227
|
end
|
180
|
-
response['cod'].to_s.should eq(
|
228
|
+
response['cod'].to_s.should eq('404')
|
181
229
|
end
|
182
230
|
end
|
183
231
|
|
184
232
|
context 'units option' do
|
185
233
|
it 'returns the forecast in requested units' do
|
186
|
-
response = VCR.use_cassette(
|
234
|
+
response = VCR.use_cassette('api/forecast_daily_city_metric_valid') do
|
187
235
|
OpenWeather::ForecastDaily.city('Cochin, In', units: 'metric')
|
188
236
|
end
|
189
237
|
temp_metric = response['list'].first['temp']['day']
|
190
238
|
|
191
|
-
response = VCR.use_cassette(
|
239
|
+
response = VCR.use_cassette('api/forecast_daily_city_imperial_valid') do
|
192
240
|
OpenWeather::ForecastDaily.city('Cochin, In', units: 'imperial')
|
193
241
|
end
|
194
242
|
temp_imperial = response['list'].first['temp']['day']
|
@@ -200,12 +248,12 @@ describe 'Open weather Forecast Daily API' do
|
|
200
248
|
|
201
249
|
context 'cnt option' do
|
202
250
|
it 'returns the forecast for N days' do
|
203
|
-
response = VCR.use_cassette(
|
251
|
+
response = VCR.use_cassette('api/forecast_daily_cnt_default') do
|
204
252
|
OpenWeather::ForecastDaily.city('Cochin, In')
|
205
253
|
end
|
206
254
|
response['list'].count.should eq(7)
|
207
255
|
|
208
|
-
response = VCR.use_cassette(
|
256
|
+
response = VCR.use_cassette('api/forecast_daily_cnt_6') do
|
209
257
|
OpenWeather::ForecastDaily.city('Cochin, In', cnt: 6)
|
210
258
|
end
|
211
259
|
response['list'].count.should eq(6)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open-weather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HsPS mailme@hsps.in
|
@@ -9,64 +9,82 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.13'
|
18
21
|
- - ">="
|
19
22
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
23
|
+
version: 2.13.0
|
21
24
|
type: :development
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '2.13'
|
25
31
|
- - ">="
|
26
32
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
33
|
+
version: 2.13.0
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: vcr
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.9'
|
32
41
|
- - ">="
|
33
42
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
43
|
+
version: 2.9.2
|
35
44
|
type: :development
|
36
45
|
prerelease: false
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
38
47
|
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '2.9'
|
39
51
|
- - ">="
|
40
52
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
53
|
+
version: 2.9.2
|
42
54
|
- !ruby/object:Gem::Dependency
|
43
55
|
name: webmock
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
45
57
|
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.18'
|
46
61
|
- - ">="
|
47
62
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
63
|
+
version: 1.18.0
|
49
64
|
type: :development
|
50
65
|
prerelease: false
|
51
66
|
version_requirements: !ruby/object:Gem::Requirement
|
52
67
|
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '1.18'
|
53
71
|
- - ">="
|
54
72
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
73
|
+
version: 1.18.0
|
56
74
|
- !ruby/object:Gem::Dependency
|
57
75
|
name: json
|
58
76
|
requirement: !ruby/object:Gem::Requirement
|
59
77
|
requirements:
|
60
|
-
- - "
|
78
|
+
- - "~>"
|
61
79
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
80
|
+
version: '1'
|
63
81
|
type: :runtime
|
64
82
|
prerelease: false
|
65
83
|
version_requirements: !ruby/object:Gem::Requirement
|
66
84
|
requirements:
|
67
|
-
- - "
|
85
|
+
- - "~>"
|
68
86
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
87
|
+
version: '1'
|
70
88
|
description: " A ruby wrapper for Open Weather Map API. "
|
71
89
|
email:
|
72
90
|
- mailme@hsps.in
|
@@ -76,8 +94,9 @@ extra_rdoc_files: []
|
|
76
94
|
files:
|
77
95
|
- ".gitignore"
|
78
96
|
- ".rspec"
|
97
|
+
- ".travis.yml"
|
98
|
+
- CONTRIBUTORS.md
|
79
99
|
- Gemfile
|
80
|
-
- Gemfile.lock
|
81
100
|
- LICENSE
|
82
101
|
- README.md
|
83
102
|
- lib/open_weather.rb
|
@@ -88,6 +107,10 @@ files:
|
|
88
107
|
- lib/open_weather/forecast_daily.rb
|
89
108
|
- lib/open_weather/version.rb
|
90
109
|
- open_weather.gemspec
|
110
|
+
- spec/fixtures/cassettes/api/current_circle_zone_invalid.yml
|
111
|
+
- spec/fixtures/cassettes/api/current_circle_zone_valid.yml
|
112
|
+
- spec/fixtures/cassettes/api/current_cities_invalid.yml
|
113
|
+
- spec/fixtures/cassettes/api/current_cities_valid.yml
|
91
114
|
- spec/fixtures/cassettes/api/current_city_id_invalid.yml
|
92
115
|
- spec/fixtures/cassettes/api/current_city_id_valid.yml
|
93
116
|
- spec/fixtures/cassettes/api/current_city_imperial_valid.yml
|
@@ -96,6 +119,8 @@ files:
|
|
96
119
|
- spec/fixtures/cassettes/api/current_city_valid.yml
|
97
120
|
- spec/fixtures/cassettes/api/current_geocode_invalid.yml
|
98
121
|
- spec/fixtures/cassettes/api/current_geocode_valid.yml
|
122
|
+
- spec/fixtures/cassettes/api/current_rectangle_zone_invalid.yml
|
123
|
+
- spec/fixtures/cassettes/api/current_rectangle_zone_valid.yml
|
99
124
|
- spec/fixtures/cassettes/api/forecast_city_id_invalid.yml
|
100
125
|
- spec/fixtures/cassettes/api/forecast_city_id_valid.yml
|
101
126
|
- spec/fixtures/cassettes/api/forecast_city_imperial_valid.yml
|
@@ -115,16 +140,20 @@ files:
|
|
115
140
|
- spec/fixtures/cassettes/api/forecast_geocode_invalid.yml
|
116
141
|
- spec/fixtures/cassettes/api/forecast_geocode_valid.yml
|
117
142
|
- spec/fixtures/cassettes/api/forecast_invalid.yml
|
143
|
+
- spec/fixtures/cassettes/integration/current_by_circle_zone.yml
|
144
|
+
- spec/fixtures/cassettes/integration/current_by_cities.yml
|
118
145
|
- spec/fixtures/cassettes/integration/current_by_city.yml
|
119
146
|
- spec/fixtures/cassettes/integration/current_by_city_id.yml
|
120
147
|
- spec/fixtures/cassettes/integration/current_by_geocode.yml
|
148
|
+
- spec/fixtures/cassettes/integration/current_by_rectangle_zone.yml
|
121
149
|
- spec/fixtures/cassettes/integration/current_not_found_city.yml
|
122
150
|
- spec/integration/current_spec.rb
|
123
151
|
- spec/open_weather/api_spec.rb
|
124
152
|
- spec/open_weather/version_spec.rb
|
125
153
|
- spec/spec_helper.rb
|
126
154
|
homepage: https://github.com/coderhs/ruby_open_weather_map
|
127
|
-
licenses:
|
155
|
+
licenses:
|
156
|
+
- MIT
|
128
157
|
metadata: {}
|
129
158
|
post_install_message:
|
130
159
|
rdoc_options: []
|
@@ -142,11 +171,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
171
|
version: '0'
|
143
172
|
requirements: []
|
144
173
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.4.
|
174
|
+
rubygems_version: 2.4.8
|
146
175
|
signing_key:
|
147
176
|
specification_version: 4
|
148
177
|
summary: A ruby wrapper for Open Weather Map API.
|
149
178
|
test_files:
|
179
|
+
- spec/fixtures/cassettes/api/current_circle_zone_invalid.yml
|
180
|
+
- spec/fixtures/cassettes/api/current_circle_zone_valid.yml
|
181
|
+
- spec/fixtures/cassettes/api/current_cities_invalid.yml
|
182
|
+
- spec/fixtures/cassettes/api/current_cities_valid.yml
|
150
183
|
- spec/fixtures/cassettes/api/current_city_id_invalid.yml
|
151
184
|
- spec/fixtures/cassettes/api/current_city_id_valid.yml
|
152
185
|
- spec/fixtures/cassettes/api/current_city_imperial_valid.yml
|
@@ -155,6 +188,8 @@ test_files:
|
|
155
188
|
- spec/fixtures/cassettes/api/current_city_valid.yml
|
156
189
|
- spec/fixtures/cassettes/api/current_geocode_invalid.yml
|
157
190
|
- spec/fixtures/cassettes/api/current_geocode_valid.yml
|
191
|
+
- spec/fixtures/cassettes/api/current_rectangle_zone_invalid.yml
|
192
|
+
- spec/fixtures/cassettes/api/current_rectangle_zone_valid.yml
|
158
193
|
- spec/fixtures/cassettes/api/forecast_city_id_invalid.yml
|
159
194
|
- spec/fixtures/cassettes/api/forecast_city_id_valid.yml
|
160
195
|
- spec/fixtures/cassettes/api/forecast_city_imperial_valid.yml
|
@@ -174,9 +209,12 @@ test_files:
|
|
174
209
|
- spec/fixtures/cassettes/api/forecast_geocode_invalid.yml
|
175
210
|
- spec/fixtures/cassettes/api/forecast_geocode_valid.yml
|
176
211
|
- spec/fixtures/cassettes/api/forecast_invalid.yml
|
212
|
+
- spec/fixtures/cassettes/integration/current_by_circle_zone.yml
|
213
|
+
- spec/fixtures/cassettes/integration/current_by_cities.yml
|
177
214
|
- spec/fixtures/cassettes/integration/current_by_city.yml
|
178
215
|
- spec/fixtures/cassettes/integration/current_by_city_id.yml
|
179
216
|
- spec/fixtures/cassettes/integration/current_by_geocode.yml
|
217
|
+
- spec/fixtures/cassettes/integration/current_by_rectangle_zone.yml
|
180
218
|
- spec/fixtures/cassettes/integration/current_not_found_city.yml
|
181
219
|
- spec/integration/current_spec.rb
|
182
220
|
- spec/open_weather/api_spec.rb
|