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 +4 -4
- data/lib/shellopts/version.rb +1 -1
- data/lib/shellopts.rb +12 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c8545c5ef2b66679aa262ab499925ffa3e3a53e99df55844f658877a4722095
|
4
|
+
data.tar.gz: adf2161d1a41f0161ed76031329a306677c88af739f341f01771eba863330a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260e46338b058593f0561bf524e595455060101e0de1bec96e3209b15992318cd29ed99a188d539ac2d57dad7c818306249fa3104a23da8e9fc665c1a7cb13fe
|
7
|
+
data.tar.gz: 221cc49626cdd1d172f570187facf4e3941420ec12fc2fbe16a3d73c56fcddf048db40381234726467f2be8f568a9f81c95c038db0d26edff7b6fe31b76090a9
|
data/lib/shellopts/version.rb
CHANGED
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2024-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: forward_to
|