djinni 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/builtin/help.rb +15 -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: 062c85fdc24be0873bd14f9551df75ceda4946bc
|
4
|
+
data.tar.gz: 58944ed16cc1e8871c081e119ae6c088fcc6bbd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b17fc50a63f146f127397b5576b27c10c92e4619bd944d4b8dfa0c12ec258711dd9ce31e8300bb8ea69c52788eefbacac1edb4ab83fc6fde5788ce3b89f6da75
|
7
|
+
data.tar.gz: 643dd81390933371c0be9b796c0163b45c9d920787b0671a015726e60a55bfaae6f3856135ceea79abe130672a13ba3f462e217568d88d90dfb9fcd852620b8f
|
data/lib/builtin/help.rb
CHANGED
@@ -12,8 +12,22 @@ class DjinniHelpWish < DjinniWish
|
|
12
12
|
def execute(args, djinni_env = {})
|
13
13
|
wishes = djinni_env["djinni_wishes"].sort
|
14
14
|
if (args.nil? || args.empty?)
|
15
|
+
cmd_col_width = 0
|
15
16
|
wishes.map do |aliaz, wish|
|
16
|
-
|
17
|
+
if (aliaz.length > cmd_col_width)
|
18
|
+
cmd_col_width = aliaz.length
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
filler = Array.new(cmd_col_width - 7 + 4, " ").join
|
23
|
+
puts "COMMAND#{filler}DESCRIPTION"
|
24
|
+
puts "-------#{filler}-----------"
|
25
|
+
wishes.map do |aliaz, wish|
|
26
|
+
filler = Array.new(
|
27
|
+
cmd_col_width - aliaz.length + 4,
|
28
|
+
" "
|
29
|
+
).join
|
30
|
+
puts "#{aliaz}#{filler}#{wish.description}"
|
17
31
|
end
|
18
32
|
elsif (args.split(" ").length == 1)
|
19
33
|
wishes.map do |aliaz, wish|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: djinni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|