shellopts 2.4.2 → 2.4.3
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 +16 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4620f77a96e0e880d03301d91100824186c02ec20b68ffa22ff7032bb3b269d2
|
4
|
+
data.tar.gz: 628d2c0653ac9d565a860bb5941bc1ca9cf4c13c6d5709e78b355d4183c4d48b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 691e8376f9b28bfdce08cbaf64fb2cf871d09417992433f4e48b77288e1b5ccf2cc049328607e8b94e35222e631fd29c01b96bb71602bc053ab4ce1ab1b435db
|
7
|
+
data.tar.gz: 44fe34f706f91a8cee7df43a48032a97ed31fd315e04edf7c5f6a2842a61bcb010663fc63ad78da38607342b90d8617c266f0b9e56e2c70fa6d3c7befcf9f10d
|
data/lib/shellopts/version.rb
CHANGED
data/lib/shellopts.rb
CHANGED
@@ -448,24 +448,36 @@ module ShellOpts
|
|
448
448
|
# Emit a message on standard error. The --silent option suppresses these messages
|
449
449
|
def self.notice(message, newline: true)
|
450
450
|
method = newline ? :puts : :print
|
451
|
-
|
451
|
+
if !silent?
|
452
|
+
$stderr.send(method, message)
|
453
|
+
$stderr.flush
|
454
|
+
end
|
452
455
|
end
|
453
456
|
|
454
457
|
# Emit a message on standard output. The --quiet option suppresses these messages
|
455
458
|
def self.mesg(message, newline: true)
|
456
459
|
method = newline ? :puts : :print
|
457
|
-
|
460
|
+
if !quiet?
|
461
|
+
$stdout.send(method, message)
|
462
|
+
$stdout.flush
|
463
|
+
end
|
458
464
|
end
|
459
465
|
|
460
466
|
# Emit a message on standard output. The --verbose option controls these messages
|
461
467
|
def self.verb(level = 1, message, newline: true)
|
462
468
|
method = newline ? :puts : :print
|
463
|
-
|
469
|
+
if verbose?(level)
|
470
|
+
$stdout.send(method, message)
|
471
|
+
$stdout.flush
|
472
|
+
end
|
464
473
|
end
|
465
474
|
|
466
475
|
def self.debug(message, newline: true)
|
467
476
|
method = newline ? :puts : :print
|
468
|
-
|
477
|
+
if debug?
|
478
|
+
$stdout.send(method, message)
|
479
|
+
$stdout.flush
|
480
|
+
end
|
469
481
|
end
|
470
482
|
|
471
483
|
module Message
|
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.
|
4
|
+
version: 2.4.3
|
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-
|
11
|
+
date: 2024-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: forward_to
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
|
-
rubygems_version: 3.3.
|
176
|
+
rubygems_version: 3.3.7
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Parse command line options and arguments
|