djinni 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/builtin/help.rb +15 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 809f6b2c46775260aaf7b20f0b9f92cae02e25c9
4
- data.tar.gz: 80329cf9d65f0d40cda86ed64f6a6ba9d4ff49d4
3
+ metadata.gz: 062c85fdc24be0873bd14f9551df75ceda4946bc
4
+ data.tar.gz: 58944ed16cc1e8871c081e119ae6c088fcc6bbd4
5
5
  SHA512:
6
- metadata.gz: 58a9bae6e1367b6df31df213a64ef8ee126373928f7b64a81b3bee3b4eaedbb513af0b39f94b068691afc2ae67f34b31aeda3bbccf204862c26a9eafae731dd7
7
- data.tar.gz: e2b58de47795052fb682b6a161dff356e910c69ef498fd9efcf8c6ea6a23cc36af941159878a16ffe2003cc33b6f18632600e8acbbd89c5800509a705292d31d
6
+ metadata.gz: b17fc50a63f146f127397b5576b27c10c92e4619bd944d4b8dfa0c12ec258711dd9ce31e8300bb8ea69c52788eefbacac1edb4ab83fc6fde5788ce3b89f6da75
7
+ data.tar.gz: 643dd81390933371c0be9b796c0163b45c9d920787b0671a015726e60a55bfaae6f3856135ceea79abe130672a13ba3f462e217568d88d90dfb9fcd852620b8f
@@ -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
- puts "#{aliaz}\t#{wish.description}"
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.14
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-03 00:00:00.000000000 Z
11
+ date: 2015-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest