sunweather 0.3.0 → 0.3.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 +4 -4
- data/VERSION +1 -1
- data/lib/runner.rb +5 -5
- data/sunweather.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74ce93abd217f69b927922cb69b857699810c3f5
|
4
|
+
data.tar.gz: 460c4ac85a395ea184fb621cfb9efa132a6fe88c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3849b914b070724e309ffb2b2840585dc2e4437e9ceb49db1118f207c33194735ed287756262591a3eb93a7d1a6eabe931dd353cc1395f98835a8cf7bd7f226
|
7
|
+
data.tar.gz: f7713dcf2adb8158f542ee30a831cb3b2e1313743d56a7630233f78844d607d439fb25d4b927bf245072e6ad89af50926e10ae4905085651d82b7f20278a8070
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/runner.rb
CHANGED
@@ -12,14 +12,14 @@ module Sunweather
|
|
12
12
|
@geo = (ARGV[0] ? Geo.new(ARGV[0]) : Geo.new)
|
13
13
|
@sun = Sun.new(@geo.lat, @geo.lng)
|
14
14
|
@weather = Weather.new(@geo.lat, @geo.lng)
|
15
|
-
puts "Dawn from #{hours_minutes(@sun.start_of_dawn)} to #{hours_minutes(@sun.sunrise)}"
|
16
|
-
puts "Dusk from #{hours_minutes(@sun.sunset)} to #{hours_minutes(@sun.end_of_dusk)}"
|
17
|
-
puts "Temperature: #{@weather.temperature}°C, feels like #{@weather.feels_like}°C"
|
18
|
-
puts "#{@weather.conditions}
|
15
|
+
puts "Dawn from #{hours_minutes(@sun.start_of_dawn)} to #{hours_minutes(@sun.sunrise)}."
|
16
|
+
puts "Dusk from #{hours_minutes(@sun.sunset)} to #{hours_minutes(@sun.end_of_dusk)}."
|
17
|
+
puts "Temperature: #{@weather.temperature}°C, feels like #{@weather.feels_like}°C."
|
18
|
+
puts "Weather: #{@weather.conditions}, Winds #{@weather.wind_speed.downcase}, direction #{@weather.wind_direction}."
|
19
19
|
end
|
20
20
|
|
21
21
|
def hours_minutes time
|
22
|
-
|
22
|
+
%-#{time.hour}:#{"%02i" % (time.min+time.sec/30)}-
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/sunweather.gemspec
CHANGED