ultra_command_line 0.4.14 → 0.4.16
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38cb8e92a709e3511011b4925016e0c10b9e060655d8b8eafdea2594c3c9eae9
|
4
|
+
data.tar.gz: bdd2cd2cb7e13e17ef0122f5124eb5e903a396c3fc0926ee9197b50d24680200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
51
|
+
# The main option as last entry before description
|
52
52
|
option_def = word_options.concat(one_letter_options) << "--#{name}" << summary
|
53
|
-
|
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
|
data/lib/ultra_command_line.rb
CHANGED
@@ -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.
|
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:
|
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
|
-
|
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.
|