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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51b175b1dee1542792cfebad5d6e34a7046af2f0
4
- data.tar.gz: 8e9a6165c02885bab46ac6d2af4f558cde3c20da
3
+ metadata.gz: 562c5233e0d5e69fd93f9db1687c19b1e056115d
4
+ data.tar.gz: 77d4f951ea681aad99f50462dffda33692860a35
5
5
  SHA512:
6
- metadata.gz: 662ba69f570deda58fb9a27e1a1631fa26ba43373d2215a67320a94fdd6c4bf980902bb06bd92d0df61c2640026ec9a664b1efa564bf304d8bb321c635c40d4c
7
- data.tar.gz: 475cc656f48f0d0e386c5de75bccc96f0d210ee95922e1fc4bef7c6d839179049b29a17145cde21a7b871827be4867e0b71e963395dbdcfe70c7983382f4d366
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
  })
@@ -1,3 +1,3 @@
1
1
  module EverydayCliUtils
2
- VERSION = '1.7.1'
2
+ VERSION = '1.7.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everyday-cli-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Henderson