test_bench-run 3.0.0.0.pre.1 → 3.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d92ea9bb436a4890509afed4d85267f3ef6b36d2842b3619b468b6823161af11
4
- data.tar.gz: f3d114c236f29409b89a6010358affbdccaeebc2f8b9265108fc523f343aef3d
3
+ metadata.gz: 139f207c1a171ecd9dc341ea2e9b7fc16192cbbdc7db2de71970b0976bb2f491
4
+ data.tar.gz: 838dd88d80a5998e3e7344e8eff36536586eb24571c02ad444e8420ba8888794
5
5
  SHA512:
6
- metadata.gz: e54255f27f39425a4da8774832e9dbb10bd80a07b6f59123ab7753fe789a2cf7dea05690d521144201b32c28606f0d5b7045e22b1cbc1de048bf3796810bd56d
7
- data.tar.gz: d04349fc8ffb0db0f0db66708e8e6e06e3a2cc3996ffeca57590e7e498b1bc96d5e8085c8af88dac4d70106c546e0ef6f5da0dfbdf499e953654bcf7b0c29990
6
+ metadata.gz: 413e45020dc13fbb7e8a3b767441f15e4bc5dceecfb4073da83bce5abe41d810e4fa1a3dcc0b1ed1de50be044e609ce52c3ce09ecbd5da2cc9fc2b2e55b37936
7
+ data.tar.gz: ec76de11eb613867f294fc9a9c40abba596737e94918d1a6ee5cc64ca3bb5fd74c8050c0e90a876655579b5a887bfb1abbcba49be0116d4f310c2a91b24c1732
@@ -75,8 +75,8 @@ module TestBench
75
75
  receiver.public_send(:"#{attr_name}=", instance)
76
76
  end
77
77
 
78
- def self.call(path, exclude: nil)
79
- session = establish_session
78
+ def self.call(path, session: nil, exclude: nil)
79
+ session ||= establish_session
80
80
 
81
81
  instance = build(exclude:, session:)
82
82
 
@@ -94,7 +94,7 @@ module TestBench
94
94
  def call(&block)
95
95
  block.(self)
96
96
 
97
- session.isolate.stop
97
+ session.close
98
98
 
99
99
  if print_summary?
100
100
  summary.print
@@ -117,9 +117,6 @@ module TestBench
117
117
 
118
118
  session.execute(file_path)
119
119
  end
120
-
121
- rescue SelectFiles::PathNotFoundError
122
- session.execute(path)
123
120
  end
124
121
  alias :<< :path
125
122
 
@@ -17,17 +17,7 @@ module TestBench
17
17
  @paths ||= []
18
18
  end
19
19
 
20
- attr_accessor :raise_path_not_found_error
21
-
22
- def raise_path_not_found_error!
23
- self.raise_path_not_found_error = true
24
- end
25
-
26
20
  def call(path, &block)
27
- if raise_path_not_found_error
28
- raise PathNotFoundError
29
- end
30
-
31
21
  self.paths << path
32
22
 
33
23
  files.each(&block)
@@ -1,8 +1,6 @@
1
1
  module TestBench
2
2
  class Run
3
3
  class SelectFiles
4
- PathNotFoundError = Class.new(RuntimeError)
5
-
6
4
  def exclude_patterns
7
5
  @exclude_patterns ||= []
8
6
  end
@@ -30,7 +28,8 @@ module TestBench
30
28
  def call(path, &block)
31
29
  full_path = ::File.expand_path(path, apex_directory)
32
30
  if not ::File.exist?(full_path)
33
- raise PathNotFoundError, "No such file or directory - #{full_path}"
31
+ block.(path)
32
+ return
34
33
  end
35
34
 
36
35
  extension = ::File.extname(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-run
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.0.pre.1
4
+ version: 3.0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brightworks Digital