mcli 0.5.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: a5cd42cded1c1cacda621f45be96ba6cbb4303112e9aefae03605115579e8ac4
4
- data.tar.gz: f26da8110343fc06b0e344d585a0c31d0a4bdfcce729db7437002092f9667760
3
+ metadata.gz: 6d382a3a21abb134734048886960af562c4e001a4baa7ebde1503d0137878102
4
+ data.tar.gz: 9c4c329134742bdd6a021321fa7eb7c4963e6fea27b2f025e90354c2aa6e7218
5
5
  SHA512:
6
- metadata.gz: 00fc5478d2f2d80d3702c3c1aa4da8bb5dbf90556eab40102313798ab3589dad89c9038b2d2955c44981ec05fb866cb0d9bae501a9c4e8dc265f101957424bd0
7
- data.tar.gz: 6414370ae2ed5a39e08bb630f4cd99f7a7c56c8e27abcecc51331681f6eb92df479679eb1d3b01ce4f5de73aecb4ab96c7f07f353fe00a6792b6472adfd93a48
6
+ metadata.gz: a6f834278a7d95502980f236167910ee90693674b9317afca3f10986b3046ce69c2f8262c278e0c2484442dbc7cad40300bf0bb42cd50982dac81044c3d2f1fd
7
+ data.tar.gz: f1f15136da477e7290fb50da6060027ef8d45b8ace8f21296e1db11a5f0d9476e32f4df00f7de7bb77c9de65193a800cc5d94bbbb2158763f54354c30036e5c4
@@ -37,6 +37,8 @@ class MCLI::Command
37
37
 
38
38
  def create_parser
39
39
  OptionParser.new.tap do |parser|
40
+ parser.program_name = self.class.command_name
41
+
40
42
  parser.on("-h", "--help", "Help") do
41
43
  raise MCLI::HelpError.new
42
44
  end
@@ -58,6 +60,7 @@ class MCLI::Command
58
60
  end
59
61
 
60
62
  def register_as(command_name)
63
+ @command_name = command_name
61
64
  MCLI::CommandGroup.register(command_name, self)
62
65
  end
63
66
 
@@ -73,6 +76,10 @@ class MCLI::Command
73
76
  @capture_all
74
77
  end
75
78
 
79
+ def command_name
80
+ @command_name
81
+ end
82
+
76
83
  def call
77
84
  new(ARGV).tap do |command|
78
85
  begin
@@ -1,3 +1,3 @@
1
1
  module MCLI
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Thomas