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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eecdb28a5a2e9221a7d2420f2a3904ce4a96c167
4
- data.tar.gz: 531d8a1be55b6b71e8cdfb577fe7c95ff32e5d8d
3
+ metadata.gz: 656a2c7f3f5ad1227f28487581ca988e4b6c9628
4
+ data.tar.gz: 9400e8aa40dde22da42c2ae1d8fccd07fcfb0cda
5
5
  SHA512:
6
- metadata.gz: 8d7b79432900bbc38e20313f673d79321be79dd13454bc6e46718f54d89f8fa26f5325830c350436e5e3cc935f444836c38bfe63f981da4dfb2f70e22fbd8dd7
7
- data.tar.gz: 8fb15c8179e3243177ee7d3aca653db8a4ef7ba339bf25496754875b2f716417df4bf1b614c08fe5a32fbb043af4f04677a4e7ed5f4303978003a7e884c0ee88
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('http://catfacts-api.appspot.com/api/facts?number=1')
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
- raise 'ApiError' unless obj['success'] == "true"
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."
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-catfacts"
3
- spec.version = "0.0.4"
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
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: 2014-02-28 00:00:00.000000000 Z
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.0.14
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