rexe 1.0.1 → 1.0.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -1
- data/exe/rexe +13 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b38db7d7121e30105fc46901e804d228e8213abe26e0f6842390559459ff8d3
|
4
|
+
data.tar.gz: 3ca69259983f9bb3b58088b5c1cd08d7a33113547a1dd56de5449bee376dd6b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 646271cf0517c34e7adcd95454152a78e97ca1a336b237f80c6bea4875dc54245c84767735fd869c9336f4e02ea42ab89c70de31a3a4fc462b21f01fa2612f45
|
7
|
+
data.tar.gz: '09ae870b0a1e03ce682a0ab829cd12a980b503756e464435b5c6853b7a037198a9d6b743dbcf72b1bbd5477fb925f1f31eebc98e71867f882869801cbce0c037'
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -73,7 +73,7 @@ Rexe is at https://github.com/keithrbennett/rexe and can be installed with `gem
|
|
73
73
|
Here is rexe's help text as of the time of this writing:
|
74
74
|
|
75
75
|
```
|
76
|
-
rexe -- Ruby Command Line Executor/Filter -- v1.0.
|
76
|
+
rexe -- Ruby Command Line Executor/Filter -- v1.0.2 -- https://github.com/keithrbennett/rexe
|
77
77
|
|
78
78
|
Executes Ruby code on the command line,
|
79
79
|
optionally automating management of standard input and standard output,
|
@@ -116,6 +116,7 @@ Options:
|
|
116
116
|
-oy YAML
|
117
117
|
-r, --require REQUIRE(S) Gems and built-in libraries to require, comma separated;
|
118
118
|
! to clear all, or precede a name with '-' to remove
|
119
|
+
-v, --version Prints version and exits
|
119
120
|
|
120
121
|
---------------------------------------------------------------------------------------
|
121
122
|
|
data/exe/rexe
CHANGED
@@ -12,7 +12,7 @@ require 'shellwords'
|
|
12
12
|
|
13
13
|
class Rexe
|
14
14
|
|
15
|
-
VERSION = '1.0.
|
15
|
+
VERSION = '1.0.2'
|
16
16
|
|
17
17
|
PROJECT_URL = 'https://github.com/keithrbennett/rexe'
|
18
18
|
|
@@ -218,6 +218,7 @@ class Rexe
|
|
218
218
|
-oy YAML
|
219
219
|
-r, --require REQUIRE(S) Gems and built-in libraries to require, comma separated;
|
220
220
|
! to clear all, or precede a name with '-' to remove
|
221
|
+
-v, --version Prints version and exits
|
221
222
|
|
222
223
|
---------------------------------------------------------------------------------------
|
223
224
|
|
@@ -272,6 +273,9 @@ class Rexe
|
|
272
273
|
|
273
274
|
OptionParser.new do |parser|
|
274
275
|
|
276
|
+
parser.on('-c', '--clear_options', "Clear all previous command line options") do |v|
|
277
|
+
options.clear
|
278
|
+
end
|
275
279
|
|
276
280
|
parser.on('-f', '--input_file FILESPEC',
|
277
281
|
'Use this file instead of stdin; autodetects YAML and JSON file extensions') do |v|
|
@@ -333,6 +337,14 @@ class Rexe
|
|
333
337
|
end
|
334
338
|
end
|
335
339
|
|
340
|
+
# See https://stackoverflow.com/questions/54576873/ruby-optionparser-short-code-for-boolean-option
|
341
|
+
# for an excellent explanation of this optparse incantation.
|
342
|
+
# According to the answer, valid options are:
|
343
|
+
# -n no, -n yes, -n false, -n true, -n n, -n y, -n +, but not -n -.
|
344
|
+
parser.on('-n', '--[no-]noop [FLAG]', TrueClass, "Do not execute the code (useful with -g)") do |v|
|
345
|
+
options.noop = (v.nil? ? true : v)
|
346
|
+
end
|
347
|
+
|
336
348
|
parser.on('-o', '--output_format FORMAT',
|
337
349
|
'Mode with which to format values for output (`-o` + [aijJmnpsy])') do |v|
|
338
350
|
|
@@ -357,18 +369,6 @@ class Rexe
|
|
357
369
|
end
|
358
370
|
end
|
359
371
|
|
360
|
-
parser.on('-c', '--clear_options', "Clear all previous command line options") do |v|
|
361
|
-
options.clear
|
362
|
-
end
|
363
|
-
|
364
|
-
# See https://stackoverflow.com/questions/54576873/ruby-optionparser-short-code-for-boolean-option
|
365
|
-
# for an excellent explanation of this optparse incantation.
|
366
|
-
# According to the answer, valid options are:
|
367
|
-
# -n no, -n yes, -n false, -n true, -n n, -n y, -n +, but not -n -.
|
368
|
-
parser.on('-n', '--[no-]noop [FLAG]', TrueClass, "Do not execute the code (useful with -g)") do |v|
|
369
|
-
options.noop = (v.nil? ? true : v)
|
370
|
-
end
|
371
|
-
|
372
372
|
parser.on('-v', '--version', 'Print version') do
|
373
373
|
puts VERSION
|
374
374
|
exit(0)
|