lita-time 0.1.1 → 0.1.2
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/lib/lita/handlers/time.rb +1 -1
- data/lita-time.gemspec +1 -1
- data/spec/lita/handlers/time_spec.rb +1 -0
- 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: 27dbd4d08b6cb2c7fb9aca402c45b114a698b4f2
|
|
4
|
+
data.tar.gz: d86e611b2f00baaf2ef8de59bcffb78c86789538
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d96e410f507daada8af7cca09ec66f4fd4738aa573e3eb29f4317540e6ce7e1375ddaa4500855fd51a626dfb675c1ea3efb0c464bf5fba40d5d81c48786592c
|
|
7
|
+
data.tar.gz: 96d938035b28f7d7c57c28114f8f0516f6bb9b9e2fa29864c4b433067f64502e339e096f98680abe852d46e621ffd6bbbf47d4a11c8e609c80b63938fc6cd699
|
data/lib/lita/handlers/time.rb
CHANGED
|
@@ -3,7 +3,7 @@ module Lita
|
|
|
3
3
|
class Time < Handler
|
|
4
4
|
URL = "http://api.worldweatheronline.com/free/v2/tz.ashx"
|
|
5
5
|
|
|
6
|
-
route(
|
|
6
|
+
route(/\A(?:what\s)?time(?:\sis\sit)?(?:\sin)?\s([^\?]+)(?:\?)?/, :fetch, command: true, help: {
|
|
7
7
|
t("help.time_key") => t("help.time_value")
|
|
8
8
|
})
|
|
9
9
|
|
data/lita-time.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = "lita-time"
|
|
3
|
-
spec.version = "0.1.
|
|
3
|
+
spec.version = "0.1.2"
|
|
4
4
|
spec.authors = ["Harlan Barnes"]
|
|
5
5
|
spec.email = ["hbarnes@pobox.com"]
|
|
6
6
|
spec.description = %q{A Lita handler for getting the curent time for a given location}
|
|
@@ -10,6 +10,7 @@ describe Lita::Handlers::Time, lita_handler: true do
|
|
|
10
10
|
it { is_expected.to route_command("what time in Mableton, GA?").to(:fetch) }
|
|
11
11
|
it { is_expected.to route_command("what time is it in Mableton, GA").to(:fetch) }
|
|
12
12
|
it { is_expected.to route_command("what time is it in Mableton, GA?").to(:fetch) }
|
|
13
|
+
it { is_expected.to_not route_command("I think it's time for lunch") }
|
|
13
14
|
|
|
14
15
|
describe "#fetch" do
|
|
15
16
|
let(:response) { double("Faraday::Response") }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lita-time
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harlan Barnes
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-10-
|
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lita
|