yr_weather 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yr_weather.rb +7 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e47549b61405e213ae2ea6473f9a506d03f6b40dc65e1c81d4f627a5bc5ae9e
4
- data.tar.gz: 71e06c608c7c9794eb1e0c50ade6129ff8f3406cc3e1c139953f464e5a09f4a9
3
+ metadata.gz: 5c2135e04382c61a18b28add359d42d910241a0950356bab5aab95b2f74515d7
4
+ data.tar.gz: e8f5e71ffda302e393a411d9e754eae247f2942484948d6b22e9bd755342ec6f
5
5
  SHA512:
6
- metadata.gz: 8cf94a05defb1d2c8ef03ec451c3f33fca09823d0ea66242b6b3327bb1c99ca754f07fc7bd3afc9c44efed0f43e4a70ac690f178899db48361b9be01c0606084
7
- data.tar.gz: a637ff390645993cd4eb1309991f347635978b040daf0d2efb7d49f922b5740c72b381853bce54980598aa60838e5579128b71d0f4e8a5c3b5a0ac3a65f6ed55
6
+ metadata.gz: de545aaac5e3c66c25aa69bbb6cd422e83e35ef669123ceef9cd95574fa1fd645b56e82f2bf947859a27abed74f273fc32aa32f35ce92065d055bf6ffd13c8c3
7
+ data.tar.gz: 8df88026d653594a00c6f9b448ad5186d50f8d4550bd46af1a513a37cbb8a30344f6483a2addf6c094d5a5d8e8b28343a6408af9d6d2ef581aa17da90dc0ddb8
@@ -177,7 +177,8 @@ class YrWeather
177
177
  nodes[t + i*6*60*60]
178
178
  end.compact.map do |node|
179
179
  {
180
- at: node.dig(:time),
180
+ from: node.dig(:time),
181
+ to: node.dig(:time) + 6*60*60,
181
182
  temperature_maximum: node.dig(:data, :next_6_hours, :details, :air_temperature_max),
182
183
  temperature_minimum: node.dig(:data, :next_6_hours, :details, :air_temperature_min),
183
184
  wind_speed_max: node.dig(:data, :instant, :details, :wind_speed),
@@ -194,7 +195,7 @@ class YrWeather
194
195
  8.times.map do |day|
195
196
  start = @start_of_day + day*24*60*60
196
197
  range = start..(start + 24*60*60)
197
- forecast(range).merge(at: start)
198
+ forecast(range).merge(from: start, to: start + 24*60*60)
198
199
  end
199
200
  end
200
201
 
@@ -210,7 +211,8 @@ class YrWeather
210
211
  }
211
212
  end
212
213
  results = {
213
- at: [],
214
+ from: [],
215
+ to: [],
214
216
  temperature: [],
215
217
  wind_speed: [],
216
218
  wind_speed_knots: [],
@@ -219,7 +221,8 @@ class YrWeather
219
221
  }
220
222
  points.each do |point|
221
223
  point[:hours].times do |i|
222
- results[:at] << point[:at] + i*60*60
224
+ results[:from] << point[:at] + i*60*60
225
+ results[:to] << point[:at] + (i+1)*60*60
223
226
  results[:temperature] << point[:temperature]
224
227
  results[:wind_speed] << point[:wind_speed]
225
228
  results[:wind_speed_knots] << to_knots(point[:wind_speed])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yr_weather
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - renen