console_runner 0.1.18 → 0.1.19

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: e978670a0d9f1fa5854543027f3e737d33b1730a
4
- data.tar.gz: e77dc5ea5ddc94e142ee6020b9ac35b9f6224d1c
3
+ metadata.gz: df82927720c132e22e5827e1f1ad7ea13b3e320f
4
+ data.tar.gz: 02cf4ea9fb249c8a919fc53d66537aa331449d82
5
5
  SHA512:
6
- metadata.gz: e0bb91b568388bbbf2c481b30001d4ac9745c0617fe4c598fc2473971453aebfec3ad3a5c794e4747e66372faab9880019829023eddc936c3438340049e90396
7
- data.tar.gz: 540f4dc2cf8eb1bafeb0f36efcecfbca7f9e2a19666300e618bd33b26754e1de35fb7b32014900d2c111ef108931b6501937a38cc889b4e507302898e25b2b97
6
+ metadata.gz: 8647ea0b4742fd25473a34dbc18a154d12bfb78f976663090e95748dd4fa0522d3efdcb487e6e415e291d63308c9005fa3c746b16f85dc6f05874e1f6ba63bd2
7
+ data.tar.gz: 5a0b7fb1485479310d5ff313a5407a76b4eaa68119735dc50dee2aa922b830034a39a2bbc7a37fd1e2052f287a0d9b51ff5d8e14a99bb2188f008fd3de62d1d1
@@ -19,7 +19,6 @@ class CommandLineParser
19
19
  ]
20
20
  end.to_h
21
21
  @parser = Trollop::Parser.new
22
- @parser.opt(:debug, 'Run in debug mode.', type: :flag)
23
22
  @parser.stop_on @sub_commands
24
23
  @initialize_method = nil
25
24
  end
@@ -46,7 +45,7 @@ class CommandLineParser
46
45
  action_index = ARGV.index(action)
47
46
  scope = ARGV[0..action_index] if action_index
48
47
  end
49
- @debug = scope.any? { |a| %w(-d --debug).include? a }
48
+ @debug = ARGV.any? { |a| %w(-d --debug).include? a }
50
49
  return unless scope.any? { |a| %w(-h --help).include? a }
51
50
  @parser.banner("\n" + banner)
52
51
  Trollop::with_standard_exception_handling(@parser) { raise Trollop::HelpNeeded }
@@ -63,6 +62,7 @@ class CommandLineParser
63
62
  raise_on_action_absence @sub_commands
64
63
  @initialize_method ||= MethodParser.new(@file_parser.initialize_method) if @file_parser.initialize_method
65
64
  @method = MethodParser.new action
65
+ @parser.opt(:debug, 'Run in debug mode.', type: :flag)
66
66
  [@initialize_method, @method].each do |method|
67
67
  next unless method
68
68
  method.trollop_opts.each { |a| @parser.opt(*a) }
@@ -1,3 +1,3 @@
1
1
  module ConsoleRunner
2
- VERSION = '0.1.18'
2
+ VERSION = '0.1.19'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Karpovich