lita-bacon-ipsum 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57950118e5a243a0cf3a9a7fca8ddea48d2fb282
4
- data.tar.gz: a7a4a0796d7e809ea49930ca931d0af642809e9b
3
+ metadata.gz: c1936babda0a71a1ea10bab750473c0eb9689e03
4
+ data.tar.gz: cc29edc12dd7226ed0040571843ea9ca4a505c3b
5
5
  SHA512:
6
- metadata.gz: 9accdb9ad2c1f8d80c0fec4fe8f3ca515495ebb1217268adea87a655b9536f200ebc28b202fb24aade53c5067707772009ac8d2caeaeda86c8d486c7a37da1ed
7
- data.tar.gz: 31cd7ea4f4c437fa12096e91564d72c8c8e2838783c117ac832280aa579b87abd6ad6864d3ebee2026d163400ebec9ceafc57c838aba3fca976bdd7d08147c18
6
+ metadata.gz: d15949b1ad56bbaf7d6f6e3fbd8580f7c5e07964116d369f8b761206ac9aaf8786ad3a8f3e3a94bd82440e1013d1d98a58e4b19ea78803d3c43c421b4fdca638
7
+ data.tar.gz: 70d1dad8b5ebea79e7438f97da203f459a049d228e2261f7809ba2d177700508faac6abb586f8973299bc2a34ed576e80148308bc6805191854c471fac235f07
@@ -6,11 +6,15 @@ module Lita
6
6
  })
7
7
 
8
8
  def bacon_ipsum(response)
9
- bacon = http.get "https://baconipsum.com/api/?type=all-meat&start-with-lorem=1"
9
+ resp = http.get "https://baconipsum.com/api/?type=all-meat&start-with-lorem=1"
10
10
 
11
- raise 'RequestFail' unless bacon.status == 200
11
+ bacon = MultiJson.load(resp.body)
12
12
 
13
- response.reply "#{bacon.body[0]}"
13
+ if bacon
14
+ response.reply bacon[0]
15
+ else
16
+ response.reply "Sorry, I was unable to retreive bacon for you."
17
+ end
14
18
  end
15
19
 
16
20
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-bacon-ipsum"
3
- spec.version = "0.1.2"
3
+ spec.version = "0.1.3"
4
4
  spec.authors = ["Chris Mikelson"]
5
5
  spec.email = ["chrismikelson@gmail.com"]
6
6
  spec.description = "Get bacon ipsum text from Lita."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-bacon-ipsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Mikelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita