subcommander 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. data/lib/subcommander.rb +4 -3
  2. metadata +6 -6
@@ -55,7 +55,8 @@ module Subcommander
55
55
  end
56
56
 
57
57
  def slop cmd_name
58
- cmd_name + ' ' * (@file_order.max.length - cmd_name.length)
58
+ max_len = @file_order.max { |a,b| a.length <=> b.length }.length
59
+ cmd_name + ' ' * (max_len - cmd_name.length)
59
60
  end
60
61
 
61
62
  def print_help
@@ -106,7 +107,7 @@ module Subcommander
106
107
  end
107
108
 
108
109
  def banner= str
109
- @opts.banner = "Usage: #{str}"
110
+ @opts.banner = " Usage: #{str}"
110
111
  end
111
112
 
112
113
  def opt *orig_args
@@ -137,7 +138,7 @@ module Subcommander
137
138
  puts @help
138
139
  end
139
140
  if (@usage)
140
- @opts.banner = "Usage: #{@usage}"
141
+ @opts.banner = " Usage: #{@usage}"
141
142
  puts
142
143
  end
143
144
  puts @opts.to_s
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subcommander
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Santos
@@ -15,11 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-12 00:00:00 -07:00
18
+ date: 2011-05-16 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
22
- description: A library for cleanly handling subcommands (and options)
22
+ description: A library for cleanly handling subcommands (and options), like Git
23
23
  email: santos.tom@gmail.com
24
24
  executables: []
25
25
 
@@ -63,6 +63,6 @@ rubyforge_project:
63
63
  rubygems_version: 1.3.7
64
64
  signing_key:
65
65
  specification_version: 3
66
- summary: A library for cleanly handling subcommands (and options)
66
+ summary: A library for cleanly handling subcommands (and options), like Git
67
67
  test_files: []
68
68