lita-bacon-ipsum 0.1.4 → 0.1.5

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: 8bfe865f1135a2425f3a80372dda10c89631b694
4
- data.tar.gz: acc20422b6f0df09b33b6c693f8c4cf8abe966d2
3
+ metadata.gz: 6f351830df304010a7cbb3c5a8772003bc9eb547
4
+ data.tar.gz: adf7793214a3c2c948f3060dbc11190dc23fac74
5
5
  SHA512:
6
- metadata.gz: 9254b48f2ff2c3e9e621b925b81287fc258ddcedd142645caafcdc5ab1f6b2e77de26436d6ba99bc94a9a1b614dd55829885039bc368f14d455fc4452fee8aab
7
- data.tar.gz: e9cc0db27e33388928d41e6f2a0d2cbc737eb88708de30c5d50020fc56190ea9830af6a7b807b9a4b38716fa9b07edd7c610b23ab041bd4a7f1d2843e2e5072e
6
+ metadata.gz: 95d3239a482b6716c08a56710de19ffab9f6afe3cfa96307a970e0179f34c86bd6055244ddc265d079e7f28b1ac5c964e93f7929ccd3e1c209bae0afc811de88
7
+ data.tar.gz: 1fe10f2bcd8acf94833a9a22fe287ad814ba97533e3b9611a8ecd157449c77745ffc33f913d13b7187548bdfed88ea0bb0153fb4a46f307c355407b87a69e8fd
@@ -3,8 +3,8 @@ module Lita
3
3
  class BaconIpsum < Handler
4
4
 
5
5
  ## Bacon Text
6
- route(/give me bacon text/i, :bacon_ipsum_text, command: true, help: {
7
- "give me bacon" => "Bacon ipsum dolor amet..."
6
+ route(/give me bacon (text)?/i, :bacon_ipsum_text, command: true, help: {
7
+ "give me bacon" => "Bacon ipsum dolor amet... Alternate: `give me bacon text`"
8
8
  })
9
9
 
10
10
  def bacon_ipsum_text(response)
@@ -20,14 +20,13 @@ module Lita
20
20
  end
21
21
 
22
22
  ## Bacon Images
23
- route(/give me bacon image ((?<width>\d+) by (?<height>\d+))?/i, :bacon_ipsum_image, command: true, help: {
23
+ route(/give me bacon (image)? ((?<width>\d+) by (?<height>\d+))?/i, :bacon_ipsum_image, command: true, help: {
24
24
  "give me bacon image WIDTH by HEIGHT" => "Gives bacon image based on WIDTH and HEIGHT"
25
25
  })
26
26
 
27
27
  def bacon_ipsum_image(response)
28
- random = rand((100...1000).step(100))
29
- height = response.match_data[:height] ||= random
30
- width = response.match_data[:width] ||= random
28
+ height = response.match_data[:height] ||= 200
29
+ width = response.match_data[:width] ||= 600
31
30
 
32
31
  response.reply "<http://baconmockup.com/#{width}/#{height}|#{width} by #{height} Bacon>"
33
32
  rescue
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-bacon-ipsum"
3
- spec.version = "0.1.4"
3
+ spec.version = "0.1.5"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-bacon-ipsum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Mikelson