ellen 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/ellen/action.rb +4 -0
- data/lib/ellen/handlers/base.rb +1 -1
- data/lib/ellen/handlers/help.rb +7 -2
- data/lib/ellen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fadab9439cdcb677b1957518a8665aa3b8d39ab3
|
4
|
+
data.tar.gz: b453149f59ffe456d6c67d9cb61d420ed9b15b25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc6e3090e688787fa2d8963b764a1530eb322e3c44ba309013e50fb257f8fae8be0c1399321bac7b22b78069bfb792cb62ec08c01aa2853ca521edfaf2534db7
|
7
|
+
data.tar.gz: 2864acd5087d41b1943b4fbce57dabf6d25e92a047305eea1fcda309b88975df3a937c016f8003d72fb1783c125d96b7506f3d9c990cbc7ffcba0292bf44b1df
|
data/CHANGELOG.md
CHANGED
data/lib/ellen/action.rb
CHANGED
data/lib/ellen/handlers/base.rb
CHANGED
data/lib/ellen/handlers/help.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
module Ellen
|
2
2
|
module Handlers
|
3
3
|
class Help < Base
|
4
|
-
on /help\z
|
5
|
-
|
4
|
+
on /help\z/, description: "Show this help message" do |message|
|
5
|
+
lines = Ellen.handlers.map(&:actions).flatten.sort_by(&:all?).map do |action|
|
6
|
+
prefix = "@#{name} " unless action.all?
|
7
|
+
line = "%-30s - #{action.description}" % "#{prefix}#{action.pattern.inspect}"
|
8
|
+
line
|
9
|
+
end
|
10
|
+
say lines.join("\n")
|
6
11
|
end
|
7
12
|
end
|
8
13
|
end
|
data/lib/ellen/version.rb
CHANGED