myweatherforecast 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bc406aab9f5f598d784019fed895b64d1cfbc9e
4
- data.tar.gz: bf9615a04c8281748d32a3d711d5d0dd2c0e495f
3
+ metadata.gz: b50d91d23828a16b56f9420f16bdb3762a147863
4
+ data.tar.gz: de4529dabbff71a67f4181ad21c2da2cae673374
5
5
  SHA512:
6
- metadata.gz: e97dc2f9c869961c409161f94c454a4dfd24e1047545e94c88464ec1f99cadd9e1fcf61b033f50cb74d9076a494848ea2898e49db39e7bed2ae790234ade0f6a
7
- data.tar.gz: c1198cb17e718517caa6bf6e96791cced478c1a20e4378af9456c4653efb7e00e10e82c0f1a49a35745a380f631941e7e3b04f105c558e0e13b57f4238498f77
6
+ metadata.gz: ae600f4dc426b72eb129118780749015ab2667e139d633782ae26afe7b3d17a55535580b441eb3f68f4f24349e6106d6d48894a779a0232d2fe5905be5b98258
7
+ data.tar.gz: a7b9c0b6971df3c56ef1879147b48e6cd15e1083b7e3a96f92172921d9ba8adf71c975657aafe8cf74a62ad1f7b4bd804225c2971a2069bebe5e5c81dd83f60f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -90,11 +90,30 @@ class MyWeatherForecast
90
90
 
91
91
  end
92
92
 
93
- def afternoon() period(12, 17) end
93
+ def ahead()
94
+
95
+ current_hour = Time.at(@hourly_data[0]['time']).hour
96
+
97
+ case current_hour
98
+ when 12..17
99
+ :afternoon
100
+ when 0..5
101
+ :early_hours
102
+ when 17..(night_time.hour+1)
103
+ :evening
104
+ when 6..12
105
+ :morning
106
+ when night_time.hour..23
107
+ :night
108
+ end
109
+
110
+ end
111
+
112
+ def afternoon() period(12, 17) end
94
113
  def early_hours() period(0, 5) end
95
114
  def evening() period(17, night_time.hour+1) end
96
115
  def morning() period(6, 12) end
97
- def night() period(night_time.hour, 23) end
116
+ def night() period(night_time.hour, 23) end
98
117
 
99
118
  def night_time()
100
119
  Time.at(@day.sunsetTime)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myweatherforecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  GwZIa3P1Ea+RT3dq6Es6+k/jkXNYth2ABedYgIgU0DgZpU/JrQ1DcvAA6VGUEwar
32
32
  ztA769NWsU/h1g==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-11-09 00:00:00.000000000 Z
34
+ date: 2016-02-23 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: forecast_io
metadata.gz.sig CHANGED
Binary file