rexe 1.0.0 → 1.0.1

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 +6 -0
  3. data/README.md +232 -363
  4. data/exe/rexe +18 -14
  5. metadata +2 -2
data/exe/rexe CHANGED
@@ -12,7 +12,7 @@ require 'shellwords'
12
12
 
13
13
  class Rexe
14
14
 
15
- VERSION = '1.0.0'
15
+ VERSION = '1.0.1'
16
16
 
17
17
  PROJECT_URL = 'https://github.com/keithrbennett/rexe'
18
18
 
@@ -177,17 +177,20 @@ class Rexe
177
177
 
178
178
  rexe -- Ruby Command Line Executor/Filter -- v#{VERSION} -- #{PROJECT_URL}
179
179
 
180
- Executes Ruby code on the command line, optionally automating management of standard input
181
- and standard output, and optionally parsing input and formatting output with YAML, JSON, etc.
180
+ Executes Ruby code on the command line,
181
+ optionally automating management of standard input and standard output,
182
+ and optionally parsing input and formatting output with YAML, JSON, etc.
182
183
 
183
184
  rexe [options] [Ruby source code]
184
185
 
185
186
  Options:
186
187
 
187
188
  -c --clear_options Clear all previous command line options specified up to now
188
- -f --input_file Use this file instead of stdin; autodetects YAML and JSON file extensions
189
- If YAML or JSON: parses file in that mode, sets input mode to -mb
190
- -g --log_format FORMAT Log format, logs to stderr, defaults to none (see -o for format options)
189
+ -f --input_file Use this file instead of stdin for preprocessed input;
190
+ if filespec has a YAML and JSON file extension,
191
+ sets input format accordingly and sets input mode to -mb
192
+ -g --log_format FORMAT Log format, logs to stderr, defaults to none
193
+ (see -o for format options)
191
194
  -h, --help Print help and exit
192
195
  -i, --input_format FORMAT Input format
193
196
  -ij JSON
@@ -196,13 +199,14 @@ class Rexe
196
199
  -iy YAML
197
200
  -l, --load RUBY_FILE(S) Ruby file(s) to load, comma separated;
198
201
  ! to clear all, or precede a name with '-' to remove
199
- -m, --input_mode MODE Mode with which to handle input (i.e. what `self` will be in your code):
200
- -ml line mode; each line is ingested as a separate string
201
- -me enumerator mode
202
- -mb big string mode; all lines combined into single multiline string
203
- -mn (default) no input mode; no special handling of input; self is an Object.new
204
- -n, --[no-]noop Do not execute the code (useful with -g); the following are valid:
205
- -n no, -n yes, -n false, -n true, -n n, -n y, -n +, but not -n -
202
+ -m, --input_mode MODE Input preprocessing mode (determines what `self` will be):
203
+ -ml line; each line is ingested as a separate string
204
+ -me enumerator (each_line on STDIN or File)
205
+ -mb big string; all lines combined into one string
206
+ -mn none (default); no input preprocessing;
207
+ self is an Object.new
208
+ -n, --[no-]noop Do not execute the code (useful with -g);
209
+ For true: yes, true, y, +; for false: no, false, n
206
210
  -o, --output_format FORMAT Output format (defaults to puts):
207
211
  -oi Inspect
208
212
  -oj JSON
@@ -222,7 +226,7 @@ class Rexe
222
226
  If source code is not specified, it will default to 'self',
223
227
  which is most likely useful only in a filter mode (-ml, -me, -mb).
224
228
 
225
- If there is an .rexerc file in your home directory, it will be run as Ruby code
229
+ If there is a .rexerc file in your home directory, it will be run as Ruby code
226
230
  before processing the input.
227
231
 
228
232
  If there is a REXE_OPTIONS environment variable, its content will be prepended
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Bennett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-14 00:00:00.000000000 Z
11
+ date: 2019-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print