lita-catfacts 0.0.4 → 0.1.0
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/catfacts.rb +2 -5
- data/lita-catfacts.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 656a2c7f3f5ad1227f28487581ca988e4b6c9628
|
4
|
+
data.tar.gz: 9400e8aa40dde22da42c2ae1d8fccd07fcfb0cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e66bbb07d892116d6cb6a25674e960411c3848bd1f23aef156e5dc1bd8720e7925930a9b5cd0f2266563761f2c9486e7d380ece76507d17d015d47eebb2c10f9
|
7
|
+
data.tar.gz: 50294fa147d75f04fbe6ffb273000454481f3536ef3906638648eec9fd59d9c904c748bcf59ea69d011cf69bd1280c5366196f6d686f1094f521ecce564ea599
|
@@ -6,16 +6,13 @@ module Lita
|
|
6
6
|
route %r{^catfact(|s)$}i, :catfacts, command: true, help: { "catfacts" => "Returns a random fact about cats." }
|
7
7
|
|
8
8
|
def catfacts(response)
|
9
|
-
resp = http.get('
|
9
|
+
resp = http.get('https://catfact.ninja/fact')
|
10
10
|
|
11
11
|
raise 'RequestFail' unless resp.status == 200
|
12
12
|
|
13
13
|
obj = MultiJson.load(resp.body)
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
response.reply obj['facts'][0]
|
15
|
+
response.reply obj['fact']
|
19
16
|
|
20
17
|
rescue
|
21
18
|
response.reply "Sorry, I was unable to find any cool facts about cats."
|
data/lita-catfacts.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-catfacts"
|
3
|
-
spec.version = "0.0
|
3
|
+
spec.version = "0.1.0"
|
4
4
|
spec.authors = ["Mitch Dempsey"]
|
5
5
|
spec.email = ["mrdempsey@gmail.com"]
|
6
6
|
spec.description = %q{A Lita handler that provides very interesting facts about cats}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-catfacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitch Dempsey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
136
|
+
rubygems_version: 2.6.10
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: A Lita handler that provides very interesting facts about cats
|