shellopts 2.6.6 → 2.7.0

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
2
  SHA256:
3
- metadata.gz: 420290ad2c739d4fa7c12e3830650da129274c61b76c8a36b7342650dbc9e5af
4
- data.tar.gz: e2d6e1a76d76df2c7afcc0f992ef82e55405478001a6b2aaae906fa994fcb0f1
3
+ metadata.gz: 3906747a497d13ee1e7ba9c102184c8b331f8a02333e6a96c2b7c7c9748c6006
4
+ data.tar.gz: e4b407b8ab49895b7b2e222d59a35fcb88bb3df75449f94bbb797dbb80e5b362
5
5
  SHA512:
6
- metadata.gz: 6dcb7366651571ae2576e4695df0d3dfdc9feee6b338e5ab0902b10ce2b42e6f98168f4a30ba9b75e63025f8c294292290e7bd3af9e9a2e150e4798267d3b4bf
7
- data.tar.gz: de77ec7930a325c7da07d68df78ee05341372aec2c68c368dd5bc7c635b53d53c1ffd17492f1f367d886430a926f65ff4f0b9d4fef92172c060815276868250a
6
+ metadata.gz: 4f008f01dcc0909988aeed3e1e0def4bf9372bd31c5bdad0d3c65efb56a4b841324984ddce8bf59a49a0d16b6375538322c581489bdb64d74866c4797c39aa45
7
+ data.tar.gz: 44d1fe0700802ef288b5a087edcfb58110cc9b51e56b2282dc70bce8b161efa45f3601866709f317b81e42c47f16fd5379949da74eff76193ae31286e3717443
@@ -133,7 +133,7 @@ module ShellOpts
133
133
  s += "S" if commands.size > 1 || commands.size == 1 && commands.first.commands.size > 1
134
134
  end
135
135
  puts
136
- indent(-1).puts Ansi.bold s
136
+ indent(-1) { puts Ansi.bold s }
137
137
  newline = false
138
138
  next if child.is_a?(Section)
139
139
  else # Any other node adds a newline
@@ -1,3 +1,3 @@
1
1
  module ShellOpts
2
- VERSION = "2.6.6"
2
+ VERSION = "2.7.0"
3
3
  end
data/lib/shellopts.rb CHANGED
@@ -38,7 +38,7 @@ require_relative 'shellopts/dump.rb'
38
38
  # * Describe the difference between StandardError, RuntimeError, and IOError
39
39
  # * Add an #internal error handling for the production environment that
40
40
  # prints an intelligble error message and prettyfies stack dump. This
41
- # should catch non-RuntimeError/UIError exceptions
41
+ # should catch non-RuntimeError/IOError exceptions
42
42
  # * Find a reliable way of testing environment
43
43
 
44
44
  module ShellOpts
@@ -400,6 +400,11 @@ module ShellOpts
400
400
  end
401
401
  end
402
402
 
403
+ # The full path to the program. This is initialized when shellopts.rb is
404
+ # loaded so it is not affected by later changes of directory
405
+ @@PROGRAM_PATH = File.absolute_path($PROGRAM_NAME)
406
+ def self.path = @@PROGRAM_PATH
407
+
403
408
  def self.process(spec, argv, silent: nil, quiet: nil, verbose: nil, debug: nil, **opts)
404
409
  constrain silent, String, true, false, nil
405
410
  constrain quiet, String, true, false, nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellopts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.6
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen