knapsack_pro 6.0.2 → 6.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/knapsack_pro/adapters/rspec_adapter.rb +1 -1
- data/lib/knapsack_pro/formatters/time_tracker.rb +4 -2
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/adapters/rspec_adapter_spec.rb +9 -0
- data/spec/knapsack_pro/formatters/time_tracker_specs.rb +4 -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: '05131444388481496f61779bc12d4bb749111cf798d667d969664b5bd2668e08'
|
4
|
+
data.tar.gz: 9fb9f32b315e914e4f089ff0946a8204017740a23cf2fede172f4276b29dfcd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 786fc53dbf7b6c068c2135b3f1d29218b17a1d5155db591088a4642442b281e387afa1b8815a9ccd3adfd88da86aded5158a7f5110e09d057a021aa5ef563891
|
7
|
+
data.tar.gz: f771d87b9dcd3c2dd19cc5058d7a9dc3a56e1a2101cbaeff1210bda562bd0670341ce6f3e2f341f32a1f1e5cd49a165c96cd36999f109a7dad87a3adf7cc25ae
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 6.0.3
|
4
|
+
|
5
|
+
* fix(Turnip): make sure `.feature` files are recorded
|
6
|
+
* fix(RSpec): stop recording `UNKNOWN_PATH` that would generate an error in case of a CI node retry
|
7
|
+
|
8
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/233
|
9
|
+
|
10
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v6.0.2...v6.0.3
|
11
|
+
|
3
12
|
### 6.0.2
|
4
13
|
|
5
14
|
* fix(RSpec): allow using `TimeTracker` in RSpec < 3.10.2 when formatters were required to expose `#output`
|
@@ -115,8 +115,9 @@ module KnapsackPro
|
|
115
115
|
|
116
116
|
def record_example(accumulator, example, started_at)
|
117
117
|
path = path_for(example)
|
118
|
-
|
118
|
+
return if path.nil?
|
119
119
|
|
120
|
+
time_execution = time_execution_for(example, started_at)
|
120
121
|
if accumulator.key?(path)
|
121
122
|
accumulator[path][:time_execution] += time_execution
|
122
123
|
else
|
@@ -126,7 +127,8 @@ module KnapsackPro
|
|
126
127
|
|
127
128
|
def path_for(example)
|
128
129
|
file = file_path_for(example)
|
129
|
-
return
|
130
|
+
return nil if file == ""
|
131
|
+
|
130
132
|
path = rspec_split_by_test_example?(file) ? example.id : file
|
131
133
|
KnapsackPro::TestFileCleaner.clean(path)
|
132
134
|
end
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -305,6 +305,15 @@ describe KnapsackPro::Adapters::RSpecAdapter do
|
|
305
305
|
expect(subject).to eq('')
|
306
306
|
end
|
307
307
|
end
|
308
|
+
|
309
|
+
context "when id does not end in .feature (nor _spec.rb)" do
|
310
|
+
it "returns the file_path" do
|
311
|
+
allow(current_example).to receive(:id).and_return("./foo.rb")
|
312
|
+
allow(current_example).to receive(:metadata).and_return(file_path: "./foo.feature")
|
313
|
+
|
314
|
+
expect(subject).to eq("./foo.feature")
|
315
|
+
end
|
316
|
+
end
|
308
317
|
end
|
309
318
|
|
310
319
|
describe 'bind methods' do
|
@@ -280,9 +280,9 @@ class TestTimeTracker
|
|
280
280
|
SPEC
|
281
281
|
|
282
282
|
run_specs(spec) do |spec_paths, times|
|
283
|
-
raise unless times.size ==
|
284
|
-
raise unless times[0]["path"] ==
|
285
|
-
raise unless times[
|
283
|
+
raise unless times.size == 1
|
284
|
+
raise unless times[0]["path"] == spec_paths.first
|
285
|
+
raise unless times[0]["time_execution"] == 0.0
|
286
286
|
end
|
287
287
|
|
288
288
|
ensure
|
@@ -431,7 +431,7 @@ class TestTimeTracker
|
|
431
431
|
.queue(paths)
|
432
432
|
.sort_by { |time| time["path"] }
|
433
433
|
.filter do |time|
|
434
|
-
paths.any? { |path| time["path"].start_with?(path)
|
434
|
+
paths.any? { |path| time["path"].start_with?(path) }
|
435
435
|
end
|
436
436
|
yield(paths, times, time_tracker)
|
437
437
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|