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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 139f207c1a171ecd9dc341ea2e9b7fc16192cbbdc7db2de71970b0976bb2f491
|
4
|
+
data.tar.gz: 838dd88d80a5998e3e7344e8eff36536586eb24571c02ad444e8420ba8888794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413e45020dc13fbb7e8a3b767441f15e4bc5dceecfb4073da83bce5abe41d810e4fa1a3dcc0b1ed1de50be044e609ce52c3ce09ecbd5da2cc9fc2b2e55b37936
|
7
|
+
data.tar.gz: ec76de11eb613867f294fc9a9c40abba596737e94918d1a6ee5cc64ca3bb5fd74c8050c0e90a876655579b5a887bfb1abbcba49be0116d4f310c2a91b24c1732
|
data/lib/test_bench/run/run.rb
CHANGED
@@ -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
|
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.
|
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
|
-
|
31
|
+
block.(path)
|
32
|
+
return
|
34
33
|
end
|
35
34
|
|
36
35
|
extension = ::File.extname(path)
|