lita-sushiyuki 0.0.3 → 0.0.4
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/sushiyuki.rb +6 -1
- data/lib/lita/sushiyuki/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 399fb5042c7526a9bf528112eeddf406ae697a05
|
4
|
+
data.tar.gz: c36f79cebd72a5e31ee5b58eea7edb071599e0c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d16ad11a5c231e667c5acf634ccb3563b350877f58bffd14eff5b24ab4a3caac6bb0d6c49ec9924f92f5151662a966b9b1d49170bf8d6ab5481e4ca7934a9e16
|
7
|
+
data.tar.gz: 4dfe6a039acbb628ba8d77fcae4b6c195c8556037be53fd51fea242bc86ee7a8a1e7d8100ae14872a4c2a8c99c0cf61bd4e2aacb23971cd99b8777c850f33904
|
@@ -51,6 +51,11 @@ module Lita
|
|
51
51
|
sushi[0]
|
52
52
|
end
|
53
53
|
|
54
|
+
def random_sushi
|
55
|
+
sushi = SUSHI_MAP.to_a.sample
|
56
|
+
sushi[0]
|
57
|
+
end
|
58
|
+
|
54
59
|
def sushi_url(filename)
|
55
60
|
"https://d1zd1v0cxnbx2w.cloudfront.net/images/sets/sushiyuki/#{filename}.png"
|
56
61
|
end
|
@@ -83,7 +88,7 @@ module Lita
|
|
83
88
|
|
84
89
|
route /🍣|寿司|すし|スシ|スシ/, :hear_sushi, command: false
|
85
90
|
def hear_sushi(response)
|
86
|
-
response.reply sushi_url(
|
91
|
+
response.reply sushi_url(random_sushi) if rand(5) == 0
|
87
92
|
end
|
88
93
|
end
|
89
94
|
Lita.register_handler(Sushiyuki)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-sushiyuki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fukayatsu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|