rexe 1.0.0 → 1.0.1
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 +6 -0
- data/README.md +232 -363
- data/exe/rexe +18 -14
- 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.
|
|
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,
|
|
181
|
-
|
|
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
|
|
189
|
-
|
|
190
|
-
|
|
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
|
|
200
|
-
-ml line
|
|
201
|
-
-me enumerator
|
|
202
|
-
-mb big string
|
|
203
|
-
-mn (default) no input
|
|
204
|
-
|
|
205
|
-
|
|
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
|
|
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.
|
|
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-
|
|
11
|
+
date: 2019-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: awesome_print
|