myweatherforecast 0.5.5 → 0.5.6
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/myweatherforecast.rb +21 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b50d91d23828a16b56f9420f16bdb3762a147863
|
|
4
|
+
data.tar.gz: de4529dabbff71a67f4181ad21c2da2cae673374
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae600f4dc426b72eb129118780749015ab2667e139d633782ae26afe7b3d17a55535580b441eb3f68f4f24349e6106d6d48894a779a0232d2fe5905be5b98258
|
|
7
|
+
data.tar.gz: a7b9c0b6971df3c56ef1879147b48e6cd15e1083b7e3a96f92172921d9ba8adf71c975657aafe8cf74a62ad1f7b4bd804225c2971a2069bebe5e5c81dd83f60f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/myweatherforecast.rb
CHANGED
|
@@ -90,11 +90,30 @@ class MyWeatherForecast
|
|
|
90
90
|
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
def
|
|
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.
|
|
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:
|
|
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
|