ruboty 1.2.3 → 1.2.4
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/CHANGELOG.md +3 -0
- data/lib/ruboty/actions/help.rb +8 -3
- data/lib/ruboty/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: 73ee9ea5c245fbbabc40338c12ea83ab04c88fc7
|
4
|
+
data.tar.gz: 503ad69ea92cbb2cc83e2e3c28547e33f873a933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a2c7588f3410da124234be8ee7e4b662832ceb65d767bb1e35b6ce6d88f0381f4fc83b4dda863c38e66fa28ab78c952b733bda5169b493a082ee5983ee35df
|
7
|
+
data.tar.gz: 646b6f04f870d9009a1101aef13b2930afe7121c5ab9e76cea805e52d81748aa64145049f8ed62ba0278efa48a7c62e2c2ea3f0900a714457d79cb3232b39a28
|
data/CHANGELOG.md
CHANGED
data/lib/ruboty/actions/help.rb
CHANGED
@@ -2,19 +2,24 @@ module Ruboty
|
|
2
2
|
module Actions
|
3
3
|
class Help < Base
|
4
4
|
def call
|
5
|
-
|
5
|
+
descriptions = filtered_descriptions
|
6
|
+
if descriptions.empty?
|
7
|
+
message.reply("No description matched to '#{message[:filter]}'")
|
8
|
+
else
|
9
|
+
message.reply(descriptions.join("\n"), code: true)
|
10
|
+
end
|
6
11
|
end
|
7
12
|
|
8
13
|
private
|
9
14
|
|
10
|
-
def
|
15
|
+
def filtered_descriptions
|
11
16
|
descriptions = all_descriptions
|
12
17
|
if message[:filter]
|
13
18
|
descriptions.select! do |description|
|
14
19
|
description.include?(message[:filter])
|
15
20
|
end
|
16
21
|
end
|
17
|
-
descriptions
|
22
|
+
descriptions
|
18
23
|
end
|
19
24
|
|
20
25
|
def all_descriptions
|
data/lib/ruboty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|