zetabot 2.0.2 → 2.0.3
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/Gemfile.lock +1 -1
- data/lib/Zeta/plugins/weather.rb +3 -2
- data/lib/Zeta/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24c2b1f1f7f0864b8d29fa1956542e1354eba3bb924505c3ea2b04a7acbf25dc
|
4
|
+
data.tar.gz: df10c4c2335805d7e27d15dcc96add74c73d8e8c81b7195669392c5ea3a6d247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5f8bf97a42a36a0229a8f7b746bcadee0667cd198210658cb448a7dad8180166c07fd70b0aa67845c1e23221feed8f5d0c7b0add6bf2c8d10d1208ddea1974f
|
7
|
+
data.tar.gz: 8a179ea68669fa62ea1c14130da734bfba740d4287b3ebbc0a690e9f8e8a83f4af89ce83de0cd385f61ee82b7e53a1b0770734f24c75546ed559620ff0f3ad71
|
data/Gemfile.lock
CHANGED
data/lib/Zeta/plugins/weather.rb
CHANGED
@@ -3,6 +3,7 @@ require 'persist'
|
|
3
3
|
require 'open-uri'
|
4
4
|
require 'json'
|
5
5
|
require 'unitwise'
|
6
|
+
require 'tzinfo'
|
6
7
|
|
7
8
|
module Plugins
|
8
9
|
# Forecast is a Cinch plugin for getting the weather forecast.
|
@@ -105,7 +106,7 @@ module Plugins
|
|
105
106
|
wind = Unitwise(data.wind.speed, 'kilometer')
|
106
107
|
|
107
108
|
data.reply = "OWM ∴ #{ac.formatted_address} " \
|
108
|
-
"≈ #{Time.now.
|
109
|
+
"≈ #{(Time.now.utc + data.timezone.seconds).strftime("%c") } " \
|
109
110
|
"≈ #{data.weather[0].description}, #{temp.convert_to('[degF]').to_i.round(2)} F (#{temp.convert_to('Cel').to_i.round(2)} C) " \
|
110
111
|
"≈ Humidity: #{data.main.humidity}% " \
|
111
112
|
"≈ Pressure: #{pressure.convert_to('[in_i\'Hg]').to_f.round(2)} in/Hg " \
|
@@ -145,7 +146,7 @@ module Plugins
|
|
145
146
|
tempstring = "#{current.temperature.to_i} F (#{c} C)"
|
146
147
|
|
147
148
|
data.reply = "DS ∴ #{ac.formatted_address} " \
|
148
|
-
"≈ #{
|
149
|
+
"≈ #{ TZInfo::Timezone.get(data.timezone).now.strftime("%c") } " \
|
149
150
|
"≈ #{current.summary} #{tempstring} " \
|
150
151
|
"≈ Humidity: #{current.humidity * 100}% " \
|
151
152
|
"≈ Pressure: #{p.convert_to('[in_i\'Hg]').to_f.round(2)} in/Hg " \
|
data/lib/Zeta/version.rb
CHANGED