ruboty-message_suffix 0.0.2 → 0.0.3
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/README.md +15 -2
- data/lib/ruboty/message_suffix.rb +6 -2
- data/lib/ruboty/message_suffix/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: 46a9b22813bf2e4d4b360df0cb5b185de58cdbd5
|
4
|
+
data.tar.gz: 54d58e981c9003c3ce1663539af457f19b86ac1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a3cc72cdd486eba574cd9d1747954de9aba248e0db7be47b31b3177044092a8fa3d5df39b08ba9c0ee57a866a9f283db436a75ff807d829762f3a17a624dc51
|
7
|
+
data.tar.gz: 4f121138533a1d5c7a557363943549b8d099ecf289809412f50940be1475be14c3675e855230a0c64b88021e8cc149db345cb5d7e2c3c16641fafa7a2e705fda
|
data/README.md
CHANGED
@@ -10,14 +10,27 @@ Grant any word to suffix of message.
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
+
### Basic
|
13
14
|
```bash
|
14
|
-
export RUBOT_MESSAGE_SUFFIX='どすぅ'
|
15
|
-
bundle exec ruboty
|
15
|
+
$ export RUBOT_MESSAGE_SUFFIX='どすぅ'
|
16
|
+
$ bundle exec ruboty
|
16
17
|
> ruboty ping
|
17
18
|
pong どすぅ
|
18
19
|
|
19
20
|
```
|
20
21
|
|
22
|
+
### Randomly extracted from multiple
|
23
|
+
```bash
|
24
|
+
$ export RUBOT_MESSAGE_SUFFIX='っしょ,じゃけぇ,ばってん'
|
25
|
+
$ bundle exec ruboty
|
26
|
+
> ruboty ping
|
27
|
+
pong じゃけぇ
|
28
|
+
> ruboty ping
|
29
|
+
pong っしょ
|
30
|
+
> ruboty ping
|
31
|
+
pong ばってん
|
32
|
+
```
|
33
|
+
|
21
34
|
## Demo
|
22
35
|
|
23
36
|
Coming soon...
|
@@ -5,8 +5,12 @@ module ExtensionMessage
|
|
5
5
|
def message_suffix_reply(body, options = {})
|
6
6
|
raise "Please set the value to the ENV variable 'RUBOT_MESSAGE_SUFFIX'" unless ENV.has_key?("RUBOT_MESSAGE_SUFFIX")
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
unless body.nil?
|
9
|
+
suffixes = ENV["RUBOT_MESSAGE_SUFFIX"].split(",")
|
10
|
+
body << " " << suffixes[Random.new.rand(suffixes.size)]
|
11
|
+
end
|
12
|
+
|
13
|
+
original_reply(body, options)
|
10
14
|
end
|
11
15
|
end
|
12
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-message_suffix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fukui ReTu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|