commander 4.3.2 → 4.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e67ea19807b6a4102a4d364e31685cb7aa1908e5
4
- data.tar.gz: 7d3b7bcd3282434e8090768a980daa37b0244bc1
3
+ metadata.gz: 539292421c6c437b5a79388d3736875b95a2d953
4
+ data.tar.gz: dfd174077251e2415e83a49ce5a9d518457986d4
5
5
  SHA512:
6
- metadata.gz: 925208b58d0903d9f1c67c5280395ce0765ad77b99a16d270fec2bd1087791e3d2bce1a3c02d858d8aa4b8aa18efbe44fa17128cfe227b0268efe7766f105860
7
- data.tar.gz: e1d943df80c7760cc9ea57aa73f22ad20006ddba480dca3574bf6b13b1ff26534a98516df938fe5eee7da04d2a26e833cc11d6b701604a534f64fc3ad6421a67
6
+ metadata.gz: 45fdd002a404d22e1c69e7c448c1e0559cbb572b051179ca9a2dbbc1b851d2e96983cb44ec92d53a32dc7dfed3cbfa782ebc4dd2c9cdee82df00f52dc4b65c81
7
+ data.tar.gz: ded7f701bdadcdd2ddd2e26068121bbdc9a50c29a54908ae18d70a89f189142e286235c74be22458542e7435a7279a12489c2097668495ff15bde139b7e8338d
@@ -1,3 +1,7 @@
1
+ === 4.3.3 / 2015-04-21
2
+
3
+ * Updated to highline 1.7.2 to fix a regression with terminal size (https://github.com/JEG2/highline/pull/139).
4
+
1
5
  === 4.3.2 / 2015-03-31
2
6
 
3
7
  * Version bump to publish new location of Commander to Rubygems. Moved to https://github.com/commander-rb/commander
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
18
18
  s.require_paths = ['lib']
19
19
 
20
- s.add_runtime_dependency('highline', '~> 1.7.1')
20
+ s.add_runtime_dependency('highline', '~> 1.7.2')
21
21
 
22
22
  s.add_development_dependency('rspec', '~> 3.2')
23
23
  s.add_development_dependency('rake')
@@ -1,3 +1,10 @@
1
+ <%
2
+ # TODO: move into formatter?
3
+ longest_command = @commands.keys.max_by(&:size)
4
+ max_command_length = longest_command ? longest_command.size : 20
5
+ longest_alias = @aliases.keys.max_by(&:size)
6
+ max_aliases_length = longest_alias ? longest_alias.size : 20
7
+ %>
1
8
  <%= $terminal.color "NAME", :bold %>:
2
9
 
3
10
  <%= program :name %>
@@ -9,13 +16,13 @@
9
16
  <%= $terminal.color "COMMANDS", :bold %>:
10
17
  <% for name, command in @commands.sort -%>
11
18
  <% unless alias? name %>
12
- <%= "%-20s %s" % [command.name, command.summary || command.description] -%>
19
+ <%= "%-#{max_command_length}s %s" % [command.name, command.summary || command.description] -%>
13
20
  <% end -%>
14
21
  <% end %>
15
22
  <% unless @aliases.empty? %>
16
23
  <%= $terminal.color "ALIASES", :bold %>:
17
24
  <% for alias_name, args in @aliases.sort %>
18
- <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] -%>
25
+ <%= "%-#{max_aliases_length}s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] -%>
19
26
  <% end %>
20
27
  <% end %>
21
28
  <% unless @options.empty? -%>
@@ -1,3 +1,5 @@
1
+ <% max_command_length = @commands.keys.max_by(&:size).size %>
2
+ <% max_aliases_length = @aliases.keys.max_by(&:size).size %>
1
3
  <%= program :name %>
2
4
 
3
5
  <%= program :description %>
@@ -5,13 +7,13 @@
5
7
  Commands:
6
8
  <% for name, command in @commands.sort -%>
7
9
  <% unless alias? name -%>
8
- <%= "%-20s %s" % [command.name, command.summary || command.description] %>
10
+ <%= "%-#{max_command_length}s %s" % [command.name, command.summary || command.description] %>
9
11
  <% end -%>
10
12
  <% end -%>
11
13
  <% unless @aliases.empty? %>
12
14
  Aliases:
13
15
  <% for alias_name, args in @aliases.sort -%>
14
- <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
16
+ <%= "%-#{max_aliases_length}s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
15
17
  <% end -%>
16
18
  <% end %>
17
19
  <% unless @options.empty? -%>
@@ -1,3 +1,3 @@
1
1
  module Commander
2
- VERSION = '4.3.2'
2
+ VERSION = '4.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commander
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-01 00:00:00.000000000 Z
12
+ date: 2015-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.7.1
20
+ version: 1.7.2
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.7.1
27
+ version: 1.7.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement