rexe 1.3.1 → 1.4.0

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 +10 -6
  4. data/exe/rexe +22 -4
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5381849daea572a6e282c26c818c52a2dbf5e0859b7d0b2503500a590e222976
4
- data.tar.gz: 7c5123e27867beb235c1b418c66b31cabd1d0546dbf79239edd17dadd5d49b47
3
+ metadata.gz: 01fd5055bc1cb60e0fc837f5083fa07dc62076a062464f8008c1d113e91ab0d4
4
+ data.tar.gz: 77a1c459584860d45c7f01eeb110ba400da3c733af905d641cc073545edaeb5b
5
5
  SHA512:
6
- metadata.gz: 165da8a53ff192be771d94316ea1fe3cdbfbecc65f7a7a020882c128f9e95d7751fc642e5b3f697a57474cee2aefdb72c9723a6a4d07d33fae7b1ec65cec0cd6
7
- data.tar.gz: 300d2b9d707453009b2a036ffc477c1a2596f20e8897d1623fd22620eb9e7574387975bdb7a20f12892cc0acba1137b595f8c21977fc55a715e0eab6c1f60c82
6
+ metadata.gz: d0873666bc5182cabd8b8f26107f48bfc1bbff8000df091b36f94ea82d95e4ad21388f32e22b119a7e15a41ceba06af2692bbc84ad5644e98ae6e46c0572f91b
7
+ data.tar.gz: cce3cbab12d733066784c52d5e1a02ceac7ea69dfe81bf95531c0d10d05521fae3dd2eb66df8869d1de0cc481e690f90b39c9aed9100accc578671e5414ba76a
@@ -1,6 +1,12 @@
1
1
  ## rexe -- Ruby Command Line Executor/Filter
2
2
 
3
3
 
4
+ ### 1.4.0
5
+
6
+ * Handle Bundler deprecation of `with_clean_env` method.
7
+ * Mark entire file frozen_string_literal: true.
8
+
9
+
4
10
  ### 1.3.1
5
11
 
6
12
  * Add Awesome Print and Pretty Print output formats to help.
data/README.md CHANGED
@@ -231,8 +231,8 @@ A log entry is optionally output to standard error after completion of the code.
231
231
  ```yaml
232
232
  ---
233
233
  :count: 0
234
- :rexe_version: 1.0.0
235
- :start_time: '2019-04-15T13:12:15+08:00'
234
+ :rexe_version: 1.3.1
235
+ :start_time: '2019-09-11T13:28:46+07:00'
236
236
  :source_code: self
237
237
  :options:
238
238
  :input_filespec:
@@ -240,13 +240,15 @@ A log entry is optionally output to standard error after completion of the code.
240
240
  :input_mode: :one_big_string
241
241
  :loads: []
242
242
  :output_format: :awesome_print
243
+ :output_format_tty: :awesome_print
244
+ :output_format_block: :awesome_print
243
245
  :requires:
244
246
  - awesome_print
245
247
  - json
246
248
  - yaml
247
249
  :log_format: :yaml
248
250
  :noop: true
249
- :duration_secs: 0.050326
251
+ :duration_secs: 0.095705
250
252
  ```
251
253
 
252
254
  We specified `-gy` for YAML format; there are other formats as well (see the help output or this document) and the default is `-gn`, which means don't output the log entry at all.
@@ -456,15 +458,17 @@ For your convenience, the information displayed in verbose mode is available to
456
458
  --- !ruby/object:OpenStruct
457
459
  table:
458
460
  :count: 0
459
- :rexe_version: 1.0.0
460
- :start_time: '2019-04-15T13:25:56+08:00'
461
+ :rexe_version: 1.3.1
462
+ :start_time: '2019-09-11T13:25:53+07:00'
461
463
  :source_code: "$RC"
462
464
  :options:
463
- :input_filespec:
465
+ :input_filespec:
464
466
  :input_format: :none
465
467
  :input_mode: :none
466
468
  :loads: []
467
469
  :output_format: :yaml
470
+ :output_format_tty: :yaml
471
+ :output_format_block: :yaml
468
472
  :requires:
469
473
  - yaml
470
474
  :log_format: :none
data/exe/rexe CHANGED
@@ -4,6 +4,9 @@
4
4
  #
5
5
  # Inspired by https://github.com/thisredone/rb
6
6
 
7
+ # frozen_string_literal: true
8
+
9
+
7
10
  require 'bundler'
8
11
  require 'date'
9
12
  require 'optparse'
@@ -12,9 +15,9 @@ require 'shellwords'
12
15
 
13
16
  class Rexe
14
17
 
15
- VERSION = '1.3.1'.freeze
18
+ VERSION = '1.4.0'
16
19
 
17
- PROJECT_URL = 'https://github.com/keithrbennett/rexe'.freeze
20
+ PROJECT_URL = 'https://github.com/keithrbennett/rexe'
18
21
 
19
22
 
20
23
  module Helpers
@@ -25,7 +28,7 @@ class Rexe
25
28
  yield
26
29
  rescue Exception => e
27
30
  unless e.class == SystemExit
28
- $stderr.puts('rexe: ' << e.to_s)
31
+ $stderr.puts("rexe: #{e}")
29
32
  $stderr.puts("Use the -h option to get help.")
30
33
  exit(-1)
31
34
  end
@@ -548,4 +551,19 @@ class Rexe
548
551
  end
549
552
  end
550
553
 
551
- Bundler.with_clean_env { Rexe::Main.new.call }
554
+
555
+ def bundler_run(&block)
556
+ # This used to be an unconditional call to with_clean_env but that method is now deprecated:
557
+ # [DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`.
558
+ # If you instead want the environment before bundler was originally loaded,
559
+ # use `Bundler.with_original_env`
560
+
561
+ if Bundler.respond_to?(:with_unbundled_env)
562
+ Bundler.with_unbundled_env { block.call }
563
+ else
564
+ Bundler.with_clean_env { block.call }
565
+ end
566
+ end
567
+
568
+
569
+ bundler_run { Rexe::Main.new.call }
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.3.1
4
+ version: 1.4.0
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-06-14 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.0.3
128
+ rubygems_version: 3.0.8
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Ruby Command Line Executor