luban-cli 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6a17dc64fcd6ba46e069c6625848100fa33402c
4
- data.tar.gz: 7415b6f89e06a8aa7ca5a15f0dd8682a75f6a247
3
+ metadata.gz: e49a50d9fcca865cb4d066dc6f62f469a3677cfa
4
+ data.tar.gz: 035935f5d8bcda634ad93b543360cd86db1bb063
5
5
  SHA512:
6
- metadata.gz: 9ccd92008a1cd6f97e489b42990c86ca9a6c83e99750787fa7dbcd97d9845f962007e2a1d906c05aaea6cdd3854bb6028b9fed25d12f9e84da40fe998b533ab4
7
- data.tar.gz: a06c296c1ce5e5564d48d306ac3b13bf0e1f943fca349b89ba025a1cdb0098c79fcbfcd61ec17bbd9694006a71bba8e1055357b0003275d025bbc495bf3f63e4
6
+ metadata.gz: e3145979e5059525c9182c7fd265cce20530182e53e3dcc1d79cc5e74eda1e99618b78f88752aaf3ba8a9c711af5b8602a4260a261f64e2b546ffeac62d72124
7
+ data.tar.gz: b2d28c05cd5ccf6252198903e85a56eabd6d9909d3694e43c12e28c9a80e7704cff40e20ecea01effb7a27c467f5044ab10cbcc4d2f3f8f9703387e93acbd12c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change log
2
2
 
3
- ## Version 0.4.1 (Nov 05, 2015)
3
+ ## Version 0.4.2 (Nov 05, 2015)
4
4
 
5
5
  Minor enhancements:
6
6
  * After parsing, added any remaining command line arguments to opts[:__remaining__]
@@ -9,7 +9,12 @@ module Luban
9
9
  end
10
10
 
11
11
  def undef_command(cmd)
12
- undef_singleton_method(@commands.delete(cmd.to_sym).action_method)
12
+ c = @commands.delete(cmd.to_sym)
13
+ if c.nil?
14
+ raise RuntimeError, "Command #{cmd.inspect} is NOT defined."
15
+ else
16
+ undef_singleton_method(c.action_method)
17
+ end
13
18
  end
14
19
 
15
20
  def use_commands(module_name, **opts, &blk)
@@ -267,7 +267,7 @@ module Luban
267
267
  def add_parser_commands
268
268
  add_section("Commands") do |rows|
269
269
  commands.each_value do |cmd|
270
- rows.concat(summarize(cmd.name, cmd.summary))
270
+ rows.concat(summarize(cmd.name, cmd.summary, summary_width, summary_width * 1.5))
271
271
  end
272
272
  end
273
273
  end
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module CLI
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Chi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2016-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler