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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1a2499f690753ea54d6da3451c68161eec5d8c0
4
- data.tar.gz: 56adbe5c6fa90e8a3e68c18379db8b41f963efb9
3
+ metadata.gz: 4d7ef2a47e9b641080b9a9965634d3a9c719aa08
4
+ data.tar.gz: 38c9ff5abc8af0b9787c0b8e2c4802724f0bd5ff
5
5
  SHA512:
6
- metadata.gz: 64fa8189f48fd3c330a1d25cd1d9ab4663ccd754f0e5bae3ddc3a919e2c254cae972b751ebed269a407ab81271df6e74fb488fa5487370848bdd50cb6eace263
7
- data.tar.gz: 3cab7066a3a4b3993417306fc0f2fc4a3b68022b447f1db74b9d5c7d9b0760ef293230888b6b062e70e69a2c3a5734268f5dd9081b3594552f8722f40aed5ce8
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)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-weather"
3
- spec.version = "0.0.3"
3
+ spec.version = "0.0.4"
4
4
  spec.authors = ["Mitch Dempsey"]
5
5
  spec.email = ["mrdempsey@gmail.com"]
6
6
  spec.description = %q{A Lita handler that provides current weather conditions}
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.3
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-02-28 00:00:00.000000000 Z
11
+ date: 2014-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita