spectre-core 2.0.1 → 2.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 +4 -4
- data/exe/spectre +3 -3
- data/lib/spectre/version.rb +1 -1
- data/lib/spectre.rb +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b37c624f29760c1122c88ec60a107bb60a96c7402aeedd5b2bc3919bbe68f7d
|
4
|
+
data.tar.gz: fe69db81edfcdc648bce5f5d32f584a766b6869c7b9bd398bd9f97fab9015aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53b943ea103803174ad87d51eaeb64a77724b09ce49ad1f9d97446db527e5f62b1b4ab02eec0c779f3ffedf0e2c192a6b47ce71dc6b2b1852d3ae6f68ce1b301
|
7
|
+
data.tar.gz: c29017035f83ac51f171b27647a3b714b4461a77322d2d2ae8d46749cf8a1ed6c24a03bd176f5accb6de33e568ca6aaac73144f21b3312a359ab632980b97104
|
data/exe/spectre
CHANGED
@@ -70,8 +70,8 @@ options = OptionParser.new do |opts|
|
|
70
70
|
config_overrides['formatter'] = class_name
|
71
71
|
end
|
72
72
|
|
73
|
-
opts.on('--
|
74
|
-
config_overrides['
|
73
|
+
opts.on('--reporters NAME', Array, 'Use specified reporters') do |reporters|
|
74
|
+
config_overrides['reporters'] = reporters
|
75
75
|
end
|
76
76
|
|
77
77
|
opts.on('--json', 'Use JSON formatter') do
|
@@ -108,7 +108,7 @@ options = OptionParser.new do |opts|
|
|
108
108
|
end
|
109
109
|
|
110
110
|
opts.on('-m MODULE,MODULE', '--modules MODULE,MODULE', Array, 'Load the given modules') do |modules|
|
111
|
-
config_overrides['modules']
|
111
|
+
config_overrides['modules'] = modules
|
112
112
|
end
|
113
113
|
|
114
114
|
opts.on('-d', '--debug', 'Run in debug mode. Do not use in production!') do
|
data/lib/spectre/version.rb
CHANGED
data/lib/spectre.rb
CHANGED
@@ -194,10 +194,7 @@ module Spectre
|
|
194
194
|
def initialize(config, **)
|
195
195
|
log_file = config['log_file']
|
196
196
|
|
197
|
-
if log_file.is_a? String
|
198
|
-
log_file = log_file.gsub('<date>', DateTime.now.strftime('%Y-%m-%d_%H%M%S%3N'))
|
199
|
-
FileUtils.mkdir_p(File.dirname(log_file))
|
200
|
-
end
|
197
|
+
FileUtils.mkdir_p(File.dirname(log_file)) if log_file.is_a? String
|
201
198
|
|
202
199
|
super(log_file, **)
|
203
200
|
|
@@ -1502,8 +1499,17 @@ module Spectre
|
|
1502
1499
|
end
|
1503
1500
|
|
1504
1501
|
# Merge property overrides
|
1502
|
+
# Merging would override arrays. We don't want this in certain cases,
|
1503
|
+
# so merge them manually
|
1504
|
+
@config['reporters'].concat(config.delete('reporters')) if config.key? 'reporters'
|
1505
|
+
@config['modules'].concat(config.delete('modules')) if config.key? 'modules'
|
1505
1506
|
@config.deep_merge!(config)
|
1506
1507
|
|
1508
|
+
# Replace log filename placeholders
|
1509
|
+
if @config['log_file'].respond_to? :gsub!
|
1510
|
+
@config['log_file'].gsub!('<date>', DateTime.now.strftime('%Y-%m-%d_%H%M%S%3N'))
|
1511
|
+
end
|
1512
|
+
|
1507
1513
|
# Set env before loading specs in order to make it available in spec definitions
|
1508
1514
|
@env = @config.to_recursive_struct
|
1509
1515
|
|
@@ -1615,8 +1621,14 @@ module Spectre
|
|
1615
1621
|
#
|
1616
1622
|
def cleanup
|
1617
1623
|
Dir.chdir(@config['work_dir'])
|
1624
|
+
|
1625
|
+
# Remove all log files explicitly
|
1618
1626
|
log_file_pattern = @config['log_file'].gsub('<date>', '*')
|
1619
1627
|
FileUtils.rm_rf(Dir.glob(log_file_pattern), secure: true)
|
1628
|
+
|
1629
|
+
# Remove all files (reports) in the output directory
|
1630
|
+
out_files_pattern = File.join(@config['out_path'], '*')
|
1631
|
+
FileUtils.rm_rf(Dir.glob(out_files_pattern), secure: true)
|
1620
1632
|
end
|
1621
1633
|
|
1622
1634
|
##
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectre-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Neubauer
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: debug
|