everyday-cli-utils 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/everyday-cli-utils/option.rb +4 -4
- data/lib/everyday-cli-utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 562c5233e0d5e69fd93f9db1687c19b1e056115d
|
4
|
+
data.tar.gz: 77d4f951ea681aad99f50462dffda33692860a35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3596404b8bf5ce666c37411785d1ac8ee728143c7a7498496689a8be11b30bc30431a124ad3d8923ff43c4d3d806992acc9f45e786356f69c1bce142f094d1f
|
7
|
+
data.tar.gz: 078705d2e396e3fc11d02e86c3cfbd5612505cedb138482cfc0f5aa373d882f599d85d341264f1cc9b4f5b2c13bae2995d887c6446a827c94886160c74a16d42
|
@@ -303,7 +303,7 @@ module EverydayCliUtils
|
|
303
303
|
def defaults_option(file_path, names, settings = {})
|
304
304
|
@options ||= OptionList.new
|
305
305
|
settings[:file_path] = file_path
|
306
|
-
@options.register_special(4, :defaults, names, settings[:exit_on_save], 'Defaults set', settings,
|
306
|
+
@options.register_special(4, :defaults, names, !settings.has_key?(:exit_on_save) || settings[:exit_on_save], 'Defaults set', settings,
|
307
307
|
->(opt, options) {
|
308
308
|
IO.write(opt.settings[:file_path], options.composite(:local, :arg).to_yaml)
|
309
309
|
}, ->(opt, options) {
|
@@ -316,7 +316,7 @@ module EverydayCliUtils
|
|
316
316
|
def global_defaults_option(file_path, names, settings = {})
|
317
317
|
@options ||= OptionList.new
|
318
318
|
settings[:file_path] = file_path
|
319
|
-
@options.register_special(3, :global_defaults, names, settings[:exit_on_save], 'Global defaults set', settings,
|
319
|
+
@options.register_special(3, :global_defaults, names, !settings.has_key?(:exit_on_save) || settings[:exit_on_save], 'Global defaults set', settings,
|
320
320
|
->(opt, options) {
|
321
321
|
IO.write(opt.settings[:file_path], options.composite(:global, :arg).to_yaml)
|
322
322
|
}, ->(opt, options) {
|
@@ -328,7 +328,7 @@ module EverydayCliUtils
|
|
328
328
|
|
329
329
|
def show_defaults_option(names, settings = {})
|
330
330
|
@options ||= OptionList.new
|
331
|
-
@options.register_special(2, :show_defaults, names, settings[:exit_on_show], nil, settings,
|
331
|
+
@options.register_special(2, :show_defaults, names, !settings.has_key?(:exit_on_show) || settings[:exit_on_show], nil, settings,
|
332
332
|
->(_, options) {
|
333
333
|
puts options.show_defaults
|
334
334
|
})
|
@@ -336,7 +336,7 @@ module EverydayCliUtils
|
|
336
336
|
|
337
337
|
def help_option(names, settings = {})
|
338
338
|
@options ||= OptionList.new
|
339
|
-
@options.register_special(1, :help, names, settings[:exit_on_print], nil, settings,
|
339
|
+
@options.register_special(1, :help, names, !settings.has_key?(:exit_on_print) || settings[:exit_on_print], nil, settings,
|
340
340
|
->(_, options) {
|
341
341
|
puts options.help
|
342
342
|
})
|