test_bench-run 2.0.0.4 → 2.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce65726101de8bd7421e1489460b2d0244e82250f9bf015a631f101e39b1131a
4
- data.tar.gz: 13ab70514e937d208a17b7281eb73e9ab9cbb431814a7d9c863efabdabfa61e7
3
+ metadata.gz: f057f4407f51a413ca579f15c3044932981bdc52ce1b703601c38cecad2d74e2
4
+ data.tar.gz: 4881a7ee8bcae5fbb4904b9ac6ceb8291d071f2c5c78a8d25959e451ee32aeeb
5
5
  SHA512:
6
- metadata.gz: 95fce95a265325ca9a5400594bb99b91bf7143b6fca5355d62cf23e480171259907cf0536c0c3589a3d3126f99f9d13862a28845dfd1c25924dfe10dbfb08878
7
- data.tar.gz: c561842b6d90761406a040f24ad2a322d4637a2433ad9f31f8f1e21182b6bccc224afc94dfe47271bde32a9ea105d9e4a7692334f4936100fb194dad23547384
6
+ metadata.gz: dd980c4c70a32b74ebbb5c0bf899432692ca83566e09a9b8af198e315b33dc57612052c18c7a331f0a2bc2b2fa142b6f5f6babf013e42bb72554e6ed7319e97a
7
+ data.tar.gz: a1e8553e0342b0c67fe2b2bb4b15502166b059f9679057f732e42b3e4928184dc257f253b52c150cbe0ef1db77df5f01d7a233dd4c37d7ed92271914e880c38a
@@ -53,17 +53,20 @@ module TestBench
53
53
  rescue => exception
54
54
 
55
55
  ensure
56
- if not exception.nil?
56
+ crashed = !exception.nil?
57
+
58
+ if crashed
57
59
  fork { start! }
60
+ end
58
61
 
59
- file_reader.close
60
- telemetry_writer.close
62
+ file_reader.close
63
+ telemetry_writer.close
61
64
 
62
- exit(false)
63
- end
65
+ success = !crashed
66
+ exit(success)
64
67
  end
65
68
  # Must refer to line containing "fork { start! }"
66
- def fork_line = __LINE__ - 9
69
+ def fork_line = __LINE__ - 10
67
70
 
68
71
  def execute(file)
69
72
  file_writer.puts(file)
@@ -33,9 +33,7 @@ module TestBench
33
33
  def call(path, *paths, &block)
34
34
  paths = [path, *paths]
35
35
 
36
- exclude_file_pattern = ::File.join('**', self.exclude_file_pattern)
37
-
38
- fnmatch_flags = ::File::FNM_PATHNAME | ::File::FNM_EXTGLOB | ::File::FNM_SYSCASE
36
+ exclude_file_pattern = ::File.join('*/', self.exclude_file_pattern)
39
37
 
40
38
  paths.each do |path|
41
39
  if ::File.extname(path).empty?
@@ -47,7 +45,7 @@ module TestBench
47
45
  assure_extant(path)
48
46
 
49
47
  Dir.glob(pattern).each do |file|
50
- if ::File.fnmatch?(exclude_file_pattern, file, fnmatch_flags)
48
+ if ::File.fnmatch?(exclude_file_pattern, file, ::File::FNM_EXTGLOB)
51
49
  next
52
50
  end
53
51
 
@@ -34,10 +34,10 @@ module TestBench
34
34
  end
35
35
  attr_writer :path_sequence
36
36
 
37
- def self.build(exclude_file_pattern: nil)
37
+ def self.build(exclude: nil)
38
38
  instance = new
39
39
 
40
- GetFiles.configure(instance, exclude_file_pattern:)
40
+ GetFiles.configure(instance, exclude_file_pattern: exclude)
41
41
 
42
42
  Executor::Serial.configure(instance)
43
43
 
@@ -56,20 +56,20 @@ module TestBench
56
56
  instance
57
57
  end
58
58
 
59
- def self.call(path, session_store: nil, exclude_file_pattern: nil)
59
+ def self.call(path, session_store: nil, exclude: nil)
60
60
  session_store ||= Session::Store.instance
61
61
 
62
- instance = build(exclude_file_pattern:)
62
+ instance = build(exclude:)
63
63
 
64
64
  session_store.reset(instance.session)
65
65
 
66
66
  instance.(path)
67
67
  end
68
68
 
69
- def self.configure(receiver, exclude_file_pattern: nil, attr_name: nil)
69
+ def self.configure(receiver, exclude: nil, attr_name: nil)
70
70
  attr_name ||= :run
71
71
 
72
- instance = build(exclude_file_pattern:)
72
+ instance = build(exclude:)
73
73
  receiver.public_send(:"#{attr_name}=", instance)
74
74
  end
75
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-run
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.4
4
+ version: 2.1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-25 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_bench-fixture