ultra_command_line 0.4.14 → 0.4.16

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
- SHA1:
3
- metadata.gz: b5648284a8e6c0969546b44d57ae933504ccbdc2
4
- data.tar.gz: f9be107949020335124c203d77d23fd23b096d5e
2
+ SHA256:
3
+ metadata.gz: 38cb8e92a709e3511011b4925016e0c10b9e060655d8b8eafdea2594c3c9eae9
4
+ data.tar.gz: bdd2cd2cb7e13e17ef0122f5124eb5e903a396c3fc0926ee9197b50d24680200
5
5
  SHA512:
6
- metadata.gz: 37839f22ed52552d4308a4c0a36efaf52b96a1b3311be5c66e72e9dd623363b5ca7eeb57f5f41e904c5d30d4a5b44365393ccb9b122e3b00b82e43f2100be37b
7
- data.tar.gz: 93dfe1aa575818c3a43d6dc054186a15c5e654eaf6e735673233569aead86c552b03db7f0942200cce88f0b5427f379c5778a653551501de63e7fa6c61810c6a
6
+ metadata.gz: 9d8a2d4347952ef0fc11f1cc6578fb116fde98f43f441d7f7921dbe459f8781497c8d70f6788abff810d5b9e1a5212c2a1a0ae0bfd09f298371478dea2dec3ff
7
+ data.tar.gz: d631951725f6fafa726e0690e9626ad0c742ff23c602839b74558ae8c62fb931620b3bb612a59509187e84cbd90c6650f34d3535f5f31d3c3f5a68489efa0007
@@ -48,10 +48,10 @@ module UltraCommandLine
48
48
  def to_slop_options(slop_options = UltraCommandLine.new_slop_options)
49
49
  one_letter_options = short_aliases.map.each { |option| "-#{option}" }
50
50
  word_options = long_aliases.map.each { |option| "--#{option}" }
51
- # The main option as last entry before description
51
+ # The main option as last entry before description
52
52
  option_def = word_options.concat(one_letter_options) << "--#{name}" << summary
53
- option_def.concat [{ default: default }] unless default.nil?
54
- slop_options.send type, *option_def
53
+ option_def_options = default.nil? ? {} : { default: default }
54
+ slop_options.send type, *option_def, **option_def_options
55
55
  slop_options.banner = nil
56
56
  slop_options
57
57
  rescue NoMethodError => e
@@ -1,3 +1,3 @@
1
1
  module UltraCommandLine
2
- VERSION = '0.4.14'.freeze
2
+ VERSION = '0.4.16'.freeze
3
3
  end
@@ -13,6 +13,15 @@ module UltraCommandLine
13
13
 
14
14
  extend UltraCommandLine::Utils::BasicLogger
15
15
 
16
+
17
+ def self.permissive_mode=(permissive_state)
18
+ slop_options[:suppress_errors] = permissive_state
19
+ end
20
+
21
+ def self.permissive_mode?
22
+ slop_options[:suppress_errors]
23
+ end
24
+
16
25
  def self.slop_options
17
26
  @slop_options ||= DEFAULT_SLOP_OPTIONS
18
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultra_command_line
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-22 00:00:00.000000000 Z
11
+ date: 2023-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
- rubyforge_project:
152
- rubygems_version: 2.4.5.1
151
+ rubygems_version: 3.3.26
153
152
  signing_key:
154
153
  specification_version: 4
155
154
  summary: Manage complex sub_command line options.