ruboty-snack 0.2.0 → 0.2.1
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 +4 -4
- data/lib/ruboty/handlers/snack.rb +19 -3
- data/lib/ruboty/snack/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: cc41fa129f1900fbab5bdecf44e90577beae57a6
|
4
|
+
data.tar.gz: 463cfd9be7646fbbdbaa921838290ff274dc8f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935969489869af7446ca2b8a4204e0b12ade6e5748267497d1f42604e02b3ae57f7530d098cb4fcddc8d46e21ce8b08f9bc6ead46c880e2e6b5133d4eafa23f2
|
7
|
+
data.tar.gz: ee018404d48c6322bbe4925a3ec9cfdeb48bad9111898f6579e9e0ac41c3d2f399b509a56c2390ee9a0eb34c520c5a30f42a4a848093befc18947e216864fd3e
|
@@ -12,23 +12,39 @@ module Ruboty
|
|
12
12
|
|
13
13
|
on(
|
14
14
|
/お腹(?<status>.+)/,
|
15
|
+
name: "feed",
|
16
|
+
description: "Gives you some snacks"
|
17
|
+
)
|
18
|
+
|
19
|
+
on(
|
20
|
+
/(harahe|はらへ|ハラへ|ハラヘ)/,
|
15
21
|
name: "feed_snack",
|
16
22
|
description: "Gives you some snacks"
|
17
23
|
)
|
18
24
|
|
19
|
-
def
|
20
|
-
|
25
|
+
def feed(message)
|
26
|
+
esa =
|
21
27
|
case message[:status]
|
22
28
|
when /すい/, /空/, /へっ/, /減/, /すき/,
|
23
29
|
/ペコペコ/, /ぺこぺこ/
|
24
|
-
|
30
|
+
oyatsu
|
25
31
|
when /痛い/, /いたい/
|
26
32
|
"💊"
|
27
33
|
when /いっぱい/, /ぱんぱん/, /パンパン/, /く/, /苦/
|
28
34
|
"☕"
|
29
35
|
end
|
36
|
+
message.reply("つ#{esa}")
|
37
|
+
end
|
38
|
+
|
39
|
+
def feed_snack(message)
|
30
40
|
message.reply("つ#{oyatsu}")
|
31
41
|
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def oyatsu
|
46
|
+
OYATSU.sample
|
47
|
+
end
|
32
48
|
end
|
33
49
|
end
|
34
50
|
end
|
data/lib/ruboty/snack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-snack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Risa Harada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|