shellopts 2.2.0 → 2.3.0

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
  SHA256:
3
- metadata.gz: fccea78ec2de7eab1323d529055ce1875ca9ac6b966a40dcadad83e4e68594f5
4
- data.tar.gz: 6326b0754e0c24164bdd09f0bfbe36248aa2c7b493c1b4fa5db2c65046de7c3f
3
+ metadata.gz: 1c8545c5ef2b66679aa262ab499925ffa3e3a53e99df55844f658877a4722095
4
+ data.tar.gz: adf2161d1a41f0161ed76031329a306677c88af739f341f01771eba863330a5c
5
5
  SHA512:
6
- metadata.gz: 400ac812870c7b51321cc360e547a43e0b3976c1e6d7b2358cbc2abd3fb0491837bb230bf386a899a08967d0ed5201c8e532bb49fb12ef7aa95050c9af8b8fd6
7
- data.tar.gz: 115186fbd56935988bcdd1d7f37b00168e4432aa5fff889933b79b7ddbea0be5ab95f0a970c635e04c713aa4664e8333f67c43bc26ccc3e4916f419afb67d65c
6
+ metadata.gz: 260e46338b058593f0561bf524e595455060101e0de1bec96e3209b15992318cd29ed99a188d539ac2d57dad7c818306249fa3104a23da8e9fc665c1a7cb13fe
7
+ data.tar.gz: 221cc49626cdd1d172f570187facf4e3941420ec12fc2fbe16a3d73c56fcddf048db40381234726467f2be8f568a9f81c95c038db0d26edff7b6fe31b76090a9
@@ -1,3 +1,3 @@
1
1
  module ShellOpts
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
data/lib/shellopts.rb CHANGED
@@ -419,20 +419,24 @@ module ShellOpts
419
419
  exit 1
420
420
  end
421
421
 
422
- def self.notice(message)
423
- $stderr.puts message if !instance.quiet || !instance.program.quiet?
422
+ def self.notice(message, newline: true)
423
+ method = newline ? :puts : :print
424
+ $stderr.send(method, message) if !instance.quiet || !instance.program.quiet? # FIXME quiet? vs __quiet__ below
424
425
  end
425
426
 
426
- def self.mesg(message)
427
- $stdout.puts message if !instance.quiet || !instance.program.__quiet__
427
+ def self.mesg(message, newline: true)
428
+ method = newline ? :puts : :print
429
+ $stdout.send(method, message) if !instance.quiet || !instance.program.__quiet__
428
430
  end
429
431
 
430
- def self.verb(level = 1, message)
431
- $stdout.puts message if instance.verbose && level <= instance.program.__verbose__
432
+ def self.verb(level = 1, message, newline: true)
433
+ method = newline ? :puts : :print
434
+ $stdout.send(method, message) if instance.verbose && level <= instance.program.__verbose__
432
435
  end
433
436
 
434
- def self.debug(message)
435
- $stdout.puts message if instance.debug && instance.program.__debug__
437
+ def self.debug(message, newline: true)
438
+ method = newline ? :puts : :print
439
+ $stdout.send(method, message) if instance.debug && instance.program.__debug__
436
440
  end
437
441
 
438
442
  def self.quiet_flag
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellopts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: forward_to