knapsack_pro 2.12.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/CHANGELOG.md +40 -0
- data/README.md +14 -1567
- data/knapsack_pro.gemspec +4 -5
- data/lib/knapsack_pro/adapters/rspec_adapter.rb +12 -2
- data/lib/knapsack_pro/allocator.rb +1 -1
- data/lib/knapsack_pro/config/ci/circle.rb +1 -2
- data/lib/knapsack_pro/queue_allocator.rb +1 -1
- data/lib/knapsack_pro/repository_adapters/git_adapter.rb +2 -1
- data/lib/knapsack_pro/runners/base_runner.rb +4 -0
- data/lib/knapsack_pro/runners/queue/base_runner.rb +4 -0
- data/lib/knapsack_pro/runners/queue/cucumber_runner.rb +3 -5
- data/lib/knapsack_pro/runners/queue/rspec_runner.rb +23 -4
- data/lib/knapsack_pro/runners/spinach_runner.rb +1 -1
- data/lib/knapsack_pro/runners/test_unit_runner.rb +14 -3
- data/lib/knapsack_pro/tracker.rb +12 -3
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/adapters/rspec_adapter_spec.rb +30 -12
- data/spec/knapsack_pro/adapters/test_unit_adapter_spec.rb +8 -1
- data/spec/knapsack_pro/config/ci/circle_spec.rb +3 -3
- data/spec/knapsack_pro/repository_adapters/git_adapter_spec.rb +3 -3
- data/spec/knapsack_pro/runners/queue/cucumber_runner_spec.rb +4 -2
- data/spec/knapsack_pro/runners/queue/rspec_runner_spec.rb +37 -7
- data/spec/knapsack_pro/runners/spinach_runner_spec.rb +5 -2
- data/spec/knapsack_pro/runners/test_unit_runner_spec.rb +1 -3
- data/spec/knapsack_pro/tracker_spec.rb +4 -2
- data/spec/spec_helper.rb +0 -3
- metadata +21 -35
@@ -24,11 +24,14 @@ describe KnapsackPro::Runners::SpinachRunner do
|
|
24
24
|
stringify_test_file_paths: stringify_test_file_paths,
|
25
25
|
test_files_to_execute_exist?: true)
|
26
26
|
end
|
27
|
+
let(:child_status) { double }
|
27
28
|
|
28
29
|
before do
|
29
30
|
expect(KnapsackPro::Adapters::SpinachAdapter).to receive(:verify_bind_method_called)
|
30
31
|
|
31
32
|
expect(Kernel).to receive(:system).with('KNAPSACK_PRO_RECORDING_ENABLED=true KNAPSACK_PRO_TEST_SUITE_TOKEN=spinach-token bundle exec spinach --custom-arg --features_path fake-test-dir -- features/a.feature features/b.feature')
|
33
|
+
|
34
|
+
allow(described_class).to receive(:child_status).and_return(child_status)
|
32
35
|
end
|
33
36
|
|
34
37
|
after { subject }
|
@@ -37,7 +40,7 @@ describe KnapsackPro::Runners::SpinachRunner do
|
|
37
40
|
let(:exitstatus) { 0 }
|
38
41
|
|
39
42
|
before do
|
40
|
-
expect(
|
43
|
+
expect(child_status).to receive(:exitstatus).and_return(exitstatus)
|
41
44
|
end
|
42
45
|
|
43
46
|
it do
|
@@ -49,7 +52,7 @@ describe KnapsackPro::Runners::SpinachRunner do
|
|
49
52
|
let(:exitstatus) { 1 }
|
50
53
|
|
51
54
|
before do
|
52
|
-
expect(
|
55
|
+
expect(child_status).to receive(:exitstatus).twice.and_return(exitstatus)
|
53
56
|
end
|
54
57
|
|
55
58
|
it do
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
|
3
1
|
describe KnapsackPro::Runners::TestUnitRunner do
|
4
2
|
subject { described_class.new(KnapsackPro::Adapters::TestUnitAdapter) }
|
5
3
|
|
@@ -27,7 +25,7 @@ describe KnapsackPro::Runners::TestUnitRunner do
|
|
27
25
|
.with(KnapsackPro::Adapters::TestUnitAdapter).and_return(runner)
|
28
26
|
|
29
27
|
auto_runner_exit_code = 0
|
30
|
-
expect(
|
28
|
+
expect(described_class).to receive(:test_unit_autorunner_run) do |flag, test_dir, cli_args|
|
31
29
|
expect(flag).to be true
|
32
30
|
expect(test_dir).to eq 'test-unit_fake'
|
33
31
|
expect(cli_args.size).to eq 4
|
@@ -95,10 +95,12 @@ describe KnapsackPro::Tracker do
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
-
it { expect(tracker.global_time).to
|
98
|
+
it { expect(tracker.global_time).to be > 0 }
|
99
99
|
it { expect(tracker.test_files_with_time.keys.size).to eql 2 }
|
100
100
|
it { expect(tracker.test_files_with_time['a_spec.rb'][:time_execution]).to eq 0 }
|
101
|
-
it
|
101
|
+
it '2nd spec (b_spec.rb) should have recorded time execution - because start_time was set during first call of stop_timer for the first spec (a_spec.rb)' do
|
102
|
+
expect(tracker.test_files_with_time['b_spec.rb'][:time_execution]).to be > 0
|
103
|
+
end
|
102
104
|
it_behaves_like '#to_a'
|
103
105
|
end
|
104
106
|
end
|
data/spec/spec_helper.rb
CHANGED
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: 2.
|
4
|
+
version: 2.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -42,36 +42,36 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 2.10.0
|
48
45
|
- - "~>"
|
49
46
|
- !ruby/object:Gem::Version
|
50
47
|
version: '3.0'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.10.0
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: 2.10.0
|
58
55
|
- - "~>"
|
59
56
|
- !ruby/object:Gem::Version
|
60
57
|
version: '3.0'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.10.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec-its
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
67
|
+
version: '1.3'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '1.
|
74
|
+
version: '1.3'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: cucumber
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,20 +128,6 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: 3.0.0
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: codeclimate-test-reporter
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
131
|
- !ruby/object:Gem::Dependency
|
146
132
|
name: pry
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,44 +146,44 @@ dependencies:
|
|
160
146
|
name: vcr
|
161
147
|
requirement: !ruby/object:Gem::Requirement
|
162
148
|
requirements:
|
163
|
-
- - "
|
149
|
+
- - ">="
|
164
150
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
151
|
+
version: '6.0'
|
166
152
|
type: :development
|
167
153
|
prerelease: false
|
168
154
|
version_requirements: !ruby/object:Gem::Requirement
|
169
155
|
requirements:
|
170
|
-
- - "
|
156
|
+
- - ">="
|
171
157
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
158
|
+
version: '6.0'
|
173
159
|
- !ruby/object:Gem::Dependency
|
174
160
|
name: webmock
|
175
161
|
requirement: !ruby/object:Gem::Requirement
|
176
162
|
requirements:
|
177
|
-
- - "
|
163
|
+
- - ">="
|
178
164
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
165
|
+
version: '3.13'
|
180
166
|
type: :development
|
181
167
|
prerelease: false
|
182
168
|
version_requirements: !ruby/object:Gem::Requirement
|
183
169
|
requirements:
|
184
|
-
- - "
|
170
|
+
- - ">="
|
185
171
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
172
|
+
version: '3.13'
|
187
173
|
- !ruby/object:Gem::Dependency
|
188
174
|
name: timecop
|
189
175
|
requirement: !ruby/object:Gem::Requirement
|
190
176
|
requirements:
|
191
177
|
- - ">="
|
192
178
|
- !ruby/object:Gem::Version
|
193
|
-
version: 0.
|
179
|
+
version: 0.9.4
|
194
180
|
type: :development
|
195
181
|
prerelease: false
|
196
182
|
version_requirements: !ruby/object:Gem::Requirement
|
197
183
|
requirements:
|
198
184
|
- - ">="
|
199
185
|
- !ruby/object:Gem::Version
|
200
|
-
version: 0.
|
186
|
+
version: 0.9.4
|
201
187
|
description: Run tests in parallel across CI server nodes based on tests execution
|
202
188
|
time. Split tests in a dynamic way to ensure parallel jobs are done at a similar
|
203
189
|
time. Thanks to that your CI build time is as fast as possible. It works with many
|
@@ -423,7 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
423
409
|
- !ruby/object:Gem::Version
|
424
410
|
version: '0'
|
425
411
|
requirements: []
|
426
|
-
rubygems_version: 3.
|
412
|
+
rubygems_version: 3.2.15
|
427
413
|
signing_key:
|
428
414
|
specification_version: 4
|
429
415
|
summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel
|