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 +4 -4
- data/lib/lita/handlers/bacon_ipsum.rb +5 -6
- data/lita-bacon-ipsum.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f351830df304010a7cbb3c5a8772003bc9eb547
|
4
|
+
data.tar.gz: adf7793214a3c2c948f3060dbc11190dc23fac74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
29
|
-
|
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
|
data/lita-bacon-ipsum.gemspec
CHANGED