lita-weather 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/weather.rb +7 -0
- data/lita-weather.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d7ef2a47e9b641080b9a9965634d3a9c719aa08
|
4
|
+
data.tar.gz: 38c9ff5abc8af0b9787c0b8e2c4802724f0bd5ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 114fbc8b219c9cf24f652d90d0c87fa9425a354539f9f56f8ab7a34c032d2ea0d5e6e4461653c81a3d441d5ce1d0bbb049255f2ace5ac446a84ab897db56f624
|
7
|
+
data.tar.gz: 78d5f6c6e15893a2690530b8154039bf8dc09cdb87aaabeb695bccc7a655ec364a05a6bd99b07a1df8a241611afbbd9ca33c7bc947e533b3fa0c8cf512e9983e
|
@@ -14,6 +14,8 @@ module Lita
|
|
14
14
|
|
15
15
|
route %r{^weather ([a-z0-9]{3,4})$}i, :weather_airport, command: true
|
16
16
|
|
17
|
+
route %r{^weather (pws:.*)}i, :weather_pws, command: true
|
18
|
+
|
17
19
|
route %r{^weather (.+\s*,\s*[a-z]{2})$}i, :weather_city, command: true
|
18
20
|
|
19
21
|
def weather_zip(response)
|
@@ -26,6 +28,11 @@ module Lita
|
|
26
28
|
response.reply get_conditions(response.matches[0][0])
|
27
29
|
end
|
28
30
|
|
31
|
+
def weather_pws(response)
|
32
|
+
return if Lita.config.handlers.weather.api_key.nil?
|
33
|
+
response.reply get_conditions(response.matches[0][0])
|
34
|
+
end
|
35
|
+
|
29
36
|
# For a city search, we send the request to google, and get the lat/lng pairs
|
30
37
|
# then send the coordinates to weather underground
|
31
38
|
def weather_city(response)
|
data/lita-weather.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-weather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitch Dempsey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|