knapsack_pro 3.8.0 → 3.9.0
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/.circleci/config.yml +2 -1
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/knapsack_pro/runners/rspec_runner.rb +1 -0
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/adapters/base_adapter_spec.rb +1 -0
- data/spec/knapsack_pro/runners/queue/minitest_runner_spec.rb +1 -0
- data/spec/knapsack_pro/runners/rspec_runner_spec.rb +39 -19
- data/spec/knapsack_pro/test_case_detectors/rspec_test_example_detector_spec.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e420b07793ab2ae891d047a88791a664ef1049cb3011a752e8c38b4c6f6a7ef7
|
4
|
+
data.tar.gz: 378a11f2229b60b8491b705764d71efb241de8b8ab56a5cffd0476157584f0f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fc8003860fd45599a4f7ffe7dd2d0fbe6a472fab237e8ec704da2ca7084bbb84dac1859624f6ec2f40e0555ba266e29568520208c43b74b90dfcebb026a20f9
|
7
|
+
data.tar.gz: a76e2e4d9b598aec22f261c40087c3b19ba67d7d3ad14a84255e135345dd373ac252d2697aa88a982e67f95e1be0ab8dab2cdfce9b4e494843ea87de1bfd5db7
|
data/.circleci/config.yml
CHANGED
@@ -8,7 +8,8 @@ jobs:
|
|
8
8
|
parallelism: 1
|
9
9
|
docker:
|
10
10
|
# specify the version you desire here
|
11
|
-
|
11
|
+
# https://circleci.com/developer/images/image/cimg/ruby
|
12
|
+
- image: cimg/ruby:3.2.1
|
12
13
|
environment:
|
13
14
|
CODECLIMATE_REPO_TOKEN: b6626e682a8e97e0c5978febc92c3526792a2d018b41b8e1b52689da37fb7d92
|
14
15
|
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 3.9.0
|
4
|
+
|
5
|
+
* Suppress all RSpec spec file names displayed in stdout at the beginning of running tests in Regular Mode only when the log level is >= `warn`
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/190
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v3.8.0...v3.9.0
|
10
|
+
|
3
11
|
### 3.8.0
|
4
12
|
|
5
13
|
* Extract URLs and point them at `https://knapsackpro.com/perma/ruby/*`
|
data/README.md
CHANGED
@@ -51,10 +51,10 @@ The `knapsack_pro` gem supports all CIs and the following test runners:
|
|
51
51
|
|
52
52
|
## Installation
|
53
53
|
|
54
|
-
The [Installation Guide](
|
54
|
+
The [Installation Guide](https://docs.knapsackpro.com/knapsack_pro-ruby/guide/?utm_source=github&utm_medium=readme&utm_campaign=knapsack_pro-ruby_gem&utm_content=installation_guide) will ask you a few questions and generate instruction steps for your project:
|
55
55
|
|
56
56
|
<div align="center">
|
57
|
-
<a href="
|
57
|
+
<a href="https://docs.knapsackpro.com/knapsack_pro-ruby/guide/?utm_source=github&utm_medium=readme&utm_campaign=knapsack_pro-ruby_gem&utm_content=installation_guide">
|
58
58
|
<img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
|
59
59
|
</a>
|
60
60
|
</div>
|
@@ -32,6 +32,7 @@ module KnapsackPro
|
|
32
32
|
# instead we pass test files and test example paths to t.rspec_opts
|
33
33
|
t.pattern = []
|
34
34
|
t.rspec_opts = "#{args} --default-path #{runner.test_dir} #{runner.stringify_test_file_paths}"
|
35
|
+
t.verbose = KnapsackPro::Config::Env.log_level < ::Logger::WARN
|
35
36
|
end
|
36
37
|
Rake::Task[task_name].invoke
|
37
38
|
end
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -98,6 +98,7 @@ describe KnapsackPro::Adapters::BaseAdapter do
|
|
98
98
|
|
99
99
|
before do
|
100
100
|
expect(::Kernel).to receive(:at_exit).and_yield
|
101
|
+
allow(File).to receive(:exist?)
|
101
102
|
expect(File).to receive(:exist?).with('.knapsack_pro/KnapsackPro-Adapters-BaseAdapter-bind_method_called_for_node_0.txt').and_return(adapter_bind_method_called_file_exists)
|
102
103
|
end
|
103
104
|
|
@@ -114,6 +114,7 @@ describe KnapsackPro::Runners::Queue::MinitestRunner do
|
|
114
114
|
expect(tracker).to receive(:set_prerun_tests).with(test_file_paths)
|
115
115
|
|
116
116
|
# .minitest_run
|
117
|
+
allow(File).to receive(:exist?)
|
117
118
|
expect(File).to receive(:exist?).with('./a_test.rb').and_return(true)
|
118
119
|
expect(File).to receive(:exist?).with('./b_test.rb').and_return(true)
|
119
120
|
expect(File).to receive(:exist?).with('./fake_path_test.rb').and_return(false)
|
@@ -36,6 +36,7 @@ describe KnapsackPro::Runners::RSpecRunner do
|
|
36
36
|
test_files_to_execute_exist?: true)
|
37
37
|
end
|
38
38
|
let(:task) { double }
|
39
|
+
let(:task_config) { double }
|
39
40
|
|
40
41
|
before do
|
41
42
|
expect(KnapsackPro::Adapters::RSpecAdapter).to receive(:verify_bind_method_called).ordered
|
@@ -47,36 +48,55 @@ describe KnapsackPro::Runners::RSpecRunner do
|
|
47
48
|
|
48
49
|
expect(Rake::Task).to receive(:[]).with('knapsack_pro:rspec_run').at_least(1).and_return(task)
|
49
50
|
|
50
|
-
|
51
|
-
expect(
|
52
|
-
expect(
|
53
|
-
expect(t).to receive(:pattern=).with([])
|
51
|
+
expect(RSpec::Core::RakeTask).to receive(:new).with('knapsack_pro:rspec_run').and_yield(task_config)
|
52
|
+
expect(task_config).to receive(:rspec_opts=).with('--profile --color --default-path fake-test-dir spec/a_spec.rb spec/b_spec.rb[1:1]')
|
53
|
+
expect(task_config).to receive(:pattern=).with([])
|
54
54
|
end
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
shared_examples 'invokes RSpec rake task' do
|
57
|
+
context 'when rake task already exists' do
|
58
|
+
before do
|
59
|
+
expect(Rake::Task).to receive(:task_defined?).with('knapsack_pro:rspec_run').and_return(true)
|
60
|
+
expect(task).to receive(:clear)
|
61
|
+
end
|
62
|
+
|
63
|
+
it do
|
64
|
+
result = double(:result)
|
65
|
+
expect(task).to receive(:invoke).and_return(result)
|
66
|
+
expect(subject).to eq result
|
67
|
+
end
|
60
68
|
end
|
61
69
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
70
|
+
context "when rake task doesn't exist" do
|
71
|
+
before do
|
72
|
+
expect(Rake::Task).to receive(:task_defined?).with('knapsack_pro:rspec_run').and_return(false)
|
73
|
+
expect(task).not_to receive(:clear)
|
74
|
+
end
|
75
|
+
|
76
|
+
it do
|
77
|
+
result = double(:result)
|
78
|
+
expect(task).to receive(:invoke).and_return(result)
|
79
|
+
expect(subject).to eq result
|
80
|
+
end
|
66
81
|
end
|
67
82
|
end
|
68
83
|
|
69
|
-
context
|
84
|
+
context 'when the default log level' do
|
70
85
|
before do
|
71
|
-
expect(
|
72
|
-
expect(task).not_to receive(:clear)
|
86
|
+
expect(task_config).to receive(:verbose=).with(true)
|
73
87
|
end
|
74
88
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
89
|
+
it_behaves_like 'invokes RSpec rake task'
|
90
|
+
end
|
91
|
+
|
92
|
+
context 'when the warning log level' do
|
93
|
+
before do
|
94
|
+
expect(KnapsackPro::Config::Env).to receive(:log_level).and_return(::Logger::WARN)
|
95
|
+
|
96
|
+
expect(task_config).to receive(:verbose=).with(false)
|
79
97
|
end
|
98
|
+
|
99
|
+
it_behaves_like 'invokes RSpec rake task'
|
80
100
|
end
|
81
101
|
end
|
82
102
|
|
@@ -11,6 +11,7 @@ describe KnapsackPro::TestCaseDetectors::RSpecTestExampleDetector do
|
|
11
11
|
|
12
12
|
expect(FileUtils).to receive(:mkdir_p).with(report_dir)
|
13
13
|
|
14
|
+
allow(File).to receive(:exist?)
|
14
15
|
expect(File).to receive(:exist?).at_least(:once).with(report_path).and_return(true)
|
15
16
|
expect(File).to receive(:delete).with(report_path)
|
16
17
|
|
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: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -408,7 +408,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
408
408
|
- !ruby/object:Gem::Version
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|
411
|
-
rubygems_version: 3.
|
411
|
+
rubygems_version: 3.4.6
|
412
412
|
signing_key:
|
413
413
|
specification_version: 4
|
414
414
|
summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel
|