knapsack_pro 3.8.0 → 3.9.0

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: 8c5d5612a2f5309c5b786c57f3b51388e0381bf71c7935282ebfb0f3d5bf3d77
4
- data.tar.gz: 94767bc5aee313347653df3658a3251dabb0897211dc7694cb148392cfe8e842
3
+ metadata.gz: e420b07793ab2ae891d047a88791a664ef1049cb3011a752e8c38b4c6f6a7ef7
4
+ data.tar.gz: 378a11f2229b60b8491b705764d71efb241de8b8ab56a5cffd0476157584f0f9
5
5
  SHA512:
6
- metadata.gz: c67e3c33a86d27dc8fc79c2a31dab1a6b76dac8ea43002760bbcac3284f3e57af2f28b4fd91c0ee7469fd7a4e7dc5c32279fc89fa14afac806df4e395a0032ae
7
- data.tar.gz: c8da5c7bf455a7705daf0e012d84aeac078e7c800b7a5013806b188d41052a86f30c44e50dfd2ddf23d025fb690e173d68d0b6dddee3ede0666cdda21cc4b090
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
- - image: circleci/ruby:3.0.2
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](http://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:
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="http://docs.knapsackpro.com/knapsack_pro-ruby/guide/?utm_source=github&utm_medium=readme&utm_campaign=knapsack_pro-ruby_gem&utm_content=installation_guide">
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
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '3.8.0'
2
+ VERSION = '3.9.0'
3
3
  end
@@ -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
- t = double
51
- expect(RSpec::Core::RakeTask).to receive(:new).with('knapsack_pro:rspec_run').and_yield(t)
52
- expect(t).to receive(:rspec_opts=).with('--profile --color --default-path fake-test-dir spec/a_spec.rb spec/b_spec.rb[1:1]')
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
- context 'when rake task already exists' do
57
- before do
58
- expect(Rake::Task).to receive(:task_defined?).with('knapsack_pro:rspec_run').and_return(true)
59
- expect(task).to receive(:clear)
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
- it do
63
- result = double(:result)
64
- expect(task).to receive(:invoke).and_return(result)
65
- expect(subject).to eq result
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 "when rake task doesn't exist" do
84
+ context 'when the default log level' do
70
85
  before do
71
- expect(Rake::Task).to receive(:task_defined?).with('knapsack_pro:rspec_run').and_return(false)
72
- expect(task).not_to receive(:clear)
86
+ expect(task_config).to receive(:verbose=).with(true)
73
87
  end
74
88
 
75
- it do
76
- result = double(:result)
77
- expect(task).to receive(:invoke).and_return(result)
78
- expect(subject).to eq result
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.8.0
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-02-28 00:00:00.000000000 Z
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.2.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