rexe 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +2 -1
  4. data/exe/rexe +13 -13
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3da97ba4789e0253cb504694362282b40e5e06c153eda6c1b3c74e0a1836e5b7
4
- data.tar.gz: a3d8ee332bd23f6b77c4a01ee1a0f011aab5131c7aca42ec79984d1e3b1ee55b
3
+ metadata.gz: 3b38db7d7121e30105fc46901e804d228e8213abe26e0f6842390559459ff8d3
4
+ data.tar.gz: 3ca69259983f9bb3b58088b5c1cd08d7a33113547a1dd56de5449bee376dd6b1
5
5
  SHA512:
6
- metadata.gz: de3d6ffc907b7ef0fe448970671e6d6399a5f6eb86fecc88c805a88f1ae13ad7f71aad3339fddafce449711c9952319879894149651e6aeb5c021ba3b74a6d3a
7
- data.tar.gz: 54e8c67c50a4e48dc612f170851462921ceab006d8788e8133a769c4abbd24a0adaace90453a594daaae5b3e3cb22b53577d19750fa37baefcbd6e7ba9ded71e
6
+ metadata.gz: 646271cf0517c34e7adcd95454152a78e97ca1a336b237f80c6bea4875dc54245c84767735fd869c9336f4e02ea42ab89c70de31a3a4fc462b21f01fa2612f45
7
+ data.tar.gz: '09ae870b0a1e03ce682a0ab829cd12a980b503756e464435b5c6853b7a037198a9d6b743dbcf72b1bbd5477fb925f1f31eebc98e71867f882869801cbce0c037'
@@ -1,6 +1,11 @@
1
1
  ## rexe -- Ruby Command Line Executor/Filter
2
2
 
3
3
 
4
+ ### 1.0.2
5
+
6
+ Add mention of -v/--version to help text.
7
+
8
+
4
9
  ### 1.0.1
5
10
 
6
11
  * Improve help text.
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.1 -- https://github.com/keithrbennett/rexe
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.1'
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Bennett