ruboty-snack 0.1.0 โ†’ 0.2.0

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: 456e6d0067d8054d1211bd026ad25ebfcd6560c4
4
- data.tar.gz: eeb0e08e70d5aaece878e355aee24052e1af9970
3
+ metadata.gz: 01a35a4719070bc5028697875cf0f94f044fc6f9
4
+ data.tar.gz: 5da7def9df0118d1eff0b442198820d0dcc4f842
5
5
  SHA512:
6
- metadata.gz: bc66212ed496917041b272ba058ec7384a0b875f97508fa278b47e14142b37bd3a6266ffc985b163ab98cda0edd02db4382122b7612c9de3b646823751116b88
7
- data.tar.gz: 8939d64afbe4018a88a33ab82ce8f696c51f18f2121abf627807e6ea7d611c8b8b7219a56ea4e010950038c3662a1fe04a8f231c9f986cce1042b84fcc89ccea
6
+ metadata.gz: 9364c52bc532f3835a17f3c38f4333d90cf3bd14d929035afade0fc37a782cfd773e2d7fe9b770bf4be954b5f6d4b8a9519773fd5502958d96b506804518ad6b
7
+ data.tar.gz: cf92d0b32e6db7c4615ea062fc8eeafd8b0b951a96bfa478ad58d7804746b8dddec119601dac041ca4f7316f1c8fb970fb3b02dffdeb0b7262ab9454e1fce48b
@@ -4,20 +4,30 @@ module Ruboty
4
4
  module Handlers
5
5
  class Snack < Base
6
6
  OYATSU = %w(
7
- ๐ŸŒฐ ๐Ÿ ๐ŸŽ ๐Ÿ ๐ŸŠ ๐Ÿ‹ ๐ŸŒ ๐Ÿ‰ ๐Ÿ‡ ๐Ÿ“ ๐Ÿˆ ๐Ÿ’ ๐Ÿ‘ ๐Ÿ ๐Ÿ…
7
+ ๐ŸŒฐ ๐Ÿ ๐ŸŽ ๐Ÿ ๐ŸŠ ๐Ÿ‹ ๐ŸŒ ๐Ÿ‰ ๐Ÿ‡ ๐Ÿ“ ๐Ÿˆ ๐Ÿ’ ๐Ÿ‘ ๐Ÿ ๐Ÿ…
8
8
  ๐Ÿ† ๐ŸŒฝ ๐Ÿ  ๐Ÿž ๐Ÿง€ ๐Ÿ— ๐Ÿ– ๐Ÿค ๐Ÿณ ๐ŸŸ ๐ŸŒญ ๐Ÿ• ๐Ÿ ๐ŸŒฎ ๐ŸŒฏ
9
9
  ๐Ÿœ ๐Ÿฒ ๐Ÿฅ ๐Ÿฃ ๐Ÿฑ ๐Ÿ› ๐Ÿ™ ๐Ÿš ๐Ÿ˜ ๐Ÿข ๐Ÿก ๐Ÿง ๐Ÿจ ๐Ÿฆ ๐Ÿฐ
10
10
  ๐ŸŽ‚ ๐Ÿฎ ๐Ÿฌ ๐Ÿญ ๐Ÿซ ๐Ÿฟ ๐Ÿฉ ๐Ÿช ๐Ÿ„
11
11
  )
12
12
 
13
13
  on(
14
- /ใŠ่…นใ™ใ„ใŸ\z/i,
14
+ /ใŠ่…น(?<status>.+)/,
15
15
  name: "feed_snack",
16
16
  description: "Gives you some snacks"
17
17
  )
18
18
 
19
19
  def feed_snack(message)
20
- message.reply("ใค#{OYATSU.sample}")
20
+ oyatsu =
21
+ case message[:status]
22
+ when /ใ™ใ„/, /็ฉบ/, /ใธใฃ/, /ๆธ›/, /ใ™ใ/,
23
+ /ใƒšใ‚ณใƒšใ‚ณ/, /ใบใ“ใบใ“/
24
+ OYATSU.sample
25
+ when /็—›ใ„/, /ใ„ใŸใ„/
26
+ "๐Ÿ’Š"
27
+ when /ใ„ใฃใฑใ„/, /ใฑใ‚“ใฑใ‚“/, /ใƒ‘ใƒณใƒ‘ใƒณ/, /ใ/, /่‹ฆ/
28
+ "โ˜•"
29
+ end
30
+ message.reply("ใค#{oyatsu}")
21
31
  end
22
32
  end
23
33
  end
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Snack
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.0
4
+ version: 0.2.0
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-10-11 00:00:00.000000000 Z
11
+ date: 2016-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruboty
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.6.4
110
+ rubygems_version: 2.5.1
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Ruboty gives you a snack.