test_bench-bootstrap 7.0.2 → 7.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e69c31a9e3c8e9a9faa93deed4e46630d6d2d2fb7c5076ba4ed4a00deda92ad3
4
- data.tar.gz: 210859751f32b656864846ebc1a28046167711054b028711aa6ba0354eb5f991
3
+ metadata.gz: 7412ef4171fcd3ca6c2f107a6c142fc21b62c241645ca0d755036a561af990a6
4
+ data.tar.gz: d6c044ba850463a046b23efc9c9dd278fb8f1bbd80173de53e5c403d8c964bdf
5
5
  SHA512:
6
- metadata.gz: c9d2132905ca36a2231daad6c42e179bfcc944ccff00c6b67244f21d91e59b57180d6f0985cb6c9eda8d76c7e05e3a9a12826bb7d239e5202c6e0950f286e48f
7
- data.tar.gz: 2cff56abf3645ae094fe71809ac548e67ff364dd766a2f4c2acf0149261d1b9a7c4d944b847c1ab4c757eb0723559d607029793e762a7c2683f8370298eebda8
6
+ metadata.gz: 6e5c2167c135b3acf049106bcbef63b1ac711fea22999cc438bee449a2a73b6aca36254b4efa59b48a9b42842a1e35427cb9bcf58367ed0d6aba28c1204af961
7
+ data.tar.gz: 55d2693ad764722f7615e007bf95a3c136bb8f7da3a54cf9ed418a8928046df570cfc85d9f6a7384f5b8018512d21e9394ef21568d2871ba248b5e2340ac0f18
@@ -28,6 +28,12 @@ module TestBenchBootstrap
28
28
  arguments ||= ::ARGV
29
29
  env ||= ::ENV
30
30
 
31
+ options_env_var = env['TEST_BENCH_OPTIONS']
32
+ if not options_env_var.nil?
33
+ env_arguments = Shellwords.split(options_env_var)
34
+ arguments.unshift(*env_arguments)
35
+ end
36
+
31
37
  instance = new(arguments)
32
38
 
33
39
  instance.env = env
@@ -90,9 +96,9 @@ module TestBenchBootstrap
90
96
  ].compact.join(':')
91
97
 
92
98
  when '-d', '--detail'
93
- env['TEST_BENCH_OUTPUT_DETAIL'] = 'on'
99
+ env['TEST_BENCH_DETAIL'] = 'on'
94
100
  when '-D', '--no-detail'
95
- env['TEST_BENCH_OUTPUT_DETAIL'] = 'off'
101
+ env['TEST_BENCH_DETAIL'] = 'off'
96
102
 
97
103
  when '--device'
98
104
  device = require_next_argument(switch)
@@ -203,11 +209,12 @@ module TestBenchBootstrap
203
209
  TEST_BENCH_STRICT See --strict
204
210
  TEST_BENCH_RANDOM_SEED See --random-seed
205
211
  TEST_BENCH_FILTER_BACKTRACE_PATTERN See --filter-backtrace
206
- TEST_BENCH_OUTPUT_DETAIL See --detail
212
+ TEST_BENCH_DETAIL See --detail
207
213
  TEST_BENCH_OUTPUT_DEVICE See --device
208
214
  TEST_BENCH_OUTPUT_LEVEL See --output-level
209
215
  TEST_BENCH_OUTPUT_STYLING See --output-styling
210
216
  TEST_BENCH_DEFAULT_TEST_PATH Specifies default path
217
+ TEST_BENCH_OPTIONS Evaluated as command line arguments similar to RUBYOPT
211
218
 
212
219
  TEXT
213
220
  exit(true)
@@ -1,3 +1,5 @@
1
+ require 'test_bench_bootstrap/shellwords'
2
+
1
3
  require 'test_bench_bootstrap/test_bench/run'
2
4
 
3
5
  require 'test_bench_bootstrap/test_bench/executable/defaults'
@@ -74,6 +74,19 @@ module TestBenchBootstrap
74
74
 
75
75
  Example = self.example
76
76
  end
77
+
78
+ module NoBacktraceLocation
79
+ def self.example
80
+ backtrace = Backtrace.example
81
+
82
+ raise SomeException, Exception.exception_message, backtrace
83
+
84
+ rescue SomeException => exception
85
+ return exception
86
+ else
87
+ abort "Unreachable"
88
+ end
89
+ end
77
90
  end
78
91
  end
79
92
  end
@@ -15,13 +15,13 @@ require 'test_bench_bootstrap/test_bench/session/controls/path/apex_directory'
15
15
  require 'test_bench_bootstrap/test_bench/session/controls/path/file'
16
16
  require 'test_bench_bootstrap/test_bench/session/controls/path/file/create'
17
17
 
18
+ require 'test_bench_bootstrap/test_bench/session/controls/backtrace'
19
+ require 'test_bench_bootstrap/test_bench/session/controls/backtrace/location'
20
+
18
21
  require 'test_bench_bootstrap/test_bench/session/controls/exception/raise'
19
22
  require 'test_bench_bootstrap/test_bench/session/controls/exception'
20
23
  require 'test_bench_bootstrap/test_bench/session/controls/exception/message'
21
24
 
22
- require 'test_bench_bootstrap/test_bench/session/controls/backtrace'
23
- require 'test_bench_bootstrap/test_bench/session/controls/backtrace/location'
24
-
25
25
  require 'test_bench_bootstrap/test_bench/session/controls/text'
26
26
  require 'test_bench_bootstrap/test_bench/session/controls/message'
27
27
  require 'test_bench_bootstrap/test_bench/session/controls/title'
@@ -36,6 +36,12 @@ module TestBenchBootstrap
36
36
  end
37
37
 
38
38
  def call(exception)
39
+ backtrace_locations = exception.backtrace_locations
40
+
41
+ if backtrace_locations.nil?
42
+ return
43
+ end
44
+
39
45
  if styling?
40
46
  omitted_text = "\e[2;3m*omitted*\e[23;22m"
41
47
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brightworks Digital