knapsack_pro 4.1.0 → 5.0.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: bf60d8383722268ee562e030a1012cf20544e072faf94017bf21e417782cc4a5
4
- data.tar.gz: 91f304357d4228bdfda1c43e3387681abfe56fcbf2e75f202df565cbff0f3ec0
3
+ metadata.gz: ee1c87eca84a9ac30345268d7d2e9ac71d09003098e5173f73c0a3afccfea7bf
4
+ data.tar.gz: 52d53bd9c42699151ec2ac5ed6d340cbcdd0b632b88f2da60fcae54db3984090
5
5
  SHA512:
6
- metadata.gz: 533b1f156df0b779e1ebe476ed87a9f3811929ae4a4e271bb2d880f8deda2f0e23da41ae727d5c3d38a3828f50dce5ed99c10af5857d0abdb45a674f6a128bf2
7
- data.tar.gz: c3f1f95e7ed656c0347d09650f08b11f3a5987df3e31a54fb3b9cecc0113dd5c5e1181615803f8f938f1402b70ee3ca2649f6db5e64b135590e2e2d10c94b528
6
+ metadata.gz: 8afa9cc8410a16af780fcc854ebed0f50959eaa8c5cbdbe8fadb67e3822494ef2f18d56ee6158b1503d4db5be129a308e1e7794aab853685163b9888d70f18be
7
+ data.tar.gz: 4304ce7d54d20e43ed4576989f9700ef68f25a099671cb42a578f27ccb6fcc67dd1d2c7c0c546a96a0af9a570bc5b6c8c6c2d0742c6f1868f7a77557cd50d45f
data/CHANGELOG.md CHANGED
@@ -1,16 +1,34 @@
1
- # Change Log
1
+ # Changelog
2
+
3
+ ### 5.0.0
4
+
5
+ * __(breaking change)__ Use `KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true` as default value in Queue Mode and use `false` for proper CI providers
6
+
7
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/198
8
+
9
+ * Detect CI from environment and get the correct ENVs instead of trying all of them and risk conflicts
10
+
11
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/201
12
+
13
+ * Set `RAILS_ENV=test` / `RACK_ENV=test` in Queue Mode
14
+
15
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/199
16
+
17
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v4.1.0...v5.0.0
2
18
 
3
19
  ### 4.1.0
4
20
 
5
21
  * Add support for CI node retry count on GitHub Actions
6
22
 
23
+ __(breaking change)__ for open-source forked repositories using GitHub Actions. See a fix in PR description:
24
+
7
25
  https://github.com/KnapsackPro/knapsack_pro-ruby/pull/197
8
26
 
9
27
  https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v4.0.0...v4.1.0
10
28
 
11
29
  ### 4.0.0
12
30
 
13
- * Raise when `KNAPSACK_PRO_CI_NODE_BUILD_ID` is missing
31
+ * __(breaking change)__ Raise when `KNAPSACK_PRO_CI_NODE_BUILD_ID` is missing
14
32
 
15
33
  https://github.com/KnapsackPro/knapsack_pro-ruby/pull/195
16
34
 
@@ -26,6 +26,14 @@ module KnapsackPro
26
26
  def project_dir
27
27
  ENV['APPVEYOR_BUILD_FOLDER']
28
28
  end
29
+
30
+ def detected
31
+ ENV.key?('APPVEYOR') ? self.class : nil
32
+ end
33
+
34
+ def fixed_queue_split
35
+ false
36
+ end
29
37
  end
30
38
  end
31
39
  end
@@ -25,6 +25,13 @@ module KnapsackPro
25
25
 
26
26
  def user_seat
27
27
  end
28
+
29
+ def detected
30
+ end
31
+
32
+ def fixed_queue_split
33
+ true
34
+ end
28
35
  end
29
36
  end
30
37
  end
@@ -33,6 +33,14 @@ module KnapsackPro
33
33
  def user_seat
34
34
  ENV['BUILDKITE_BUILD_AUTHOR'] || ENV['BUILDKITE_BUILD_CREATOR']
35
35
  end
36
+
37
+ def detected
38
+ ENV.key?('BUILDKITE') ? self.class : nil
39
+ end
40
+
41
+ def fixed_queue_split
42
+ true
43
+ end
36
44
  end
37
45
  end
38
46
  end
@@ -29,6 +29,14 @@ module KnapsackPro
29
29
  def user_seat
30
30
  ENV['CIRCLE_USERNAME'] || ENV['CIRCLE_PR_USERNAME']
31
31
  end
32
+
33
+ def detected
34
+ ENV.key?('CIRCLECI') ? self.class : nil
35
+ end
36
+
37
+ def fixed_queue_split
38
+ false
39
+ end
32
40
  end
33
41
  end
34
42
  end
@@ -25,6 +25,14 @@ module KnapsackPro
25
25
  def project_dir
26
26
  ENV['CIRRUS_WORKING_DIR']
27
27
  end
28
+
29
+ def detected
30
+ ENV.key?('CIRRUS_CI') ? self.class : nil
31
+ end
32
+
33
+ def fixed_queue_split
34
+ false
35
+ end
28
36
  end
29
37
  end
30
38
  end
@@ -26,6 +26,14 @@ module KnapsackPro
26
26
  def project_dir
27
27
  # not provided
28
28
  end
29
+
30
+ def detected
31
+ ENV.key?('CF_BUILD_ID') ? self.class : nil
32
+ end
33
+
34
+ def fixed_queue_split
35
+ false
36
+ end
29
37
  end
30
38
  end
31
39
  end
@@ -25,6 +25,14 @@ module KnapsackPro
25
25
  def project_dir
26
26
  # not provided
27
27
  end
28
+
29
+ def detected
30
+ ENV['CI_NAME'] == 'codeship' ? self.class : nil
31
+ end
32
+
33
+ def fixed_queue_split
34
+ true
35
+ end
28
36
  end
29
37
  end
30
38
  end
@@ -41,6 +41,14 @@ module KnapsackPro
41
41
  def user_seat
42
42
  ENV['GITHUB_ACTOR']
43
43
  end
44
+
45
+ def detected
46
+ ENV.key?('GITHUB_ACTIONS') ? self.class : nil
47
+ end
48
+
49
+ def fixed_queue_split
50
+ true
51
+ end
44
52
  end
45
53
  end
46
54
  end
@@ -37,6 +37,14 @@ module KnapsackPro
37
37
  ENV['GITLAB_USER_NAME'] || # Gitlab Release 10.0
38
38
  ENV['GITLAB_USER_EMAIL'] # Gitlab Release 8.12
39
39
  end
40
+
41
+ def detected
42
+ ENV.key?('GITLAB_CI') ? self.class : nil
43
+ end
44
+
45
+ def fixed_queue_split
46
+ false
47
+ end
40
48
  end
41
49
  end
42
50
  end
@@ -25,6 +25,14 @@ module KnapsackPro
25
25
  def project_dir
26
26
  '/app' if node_build_id
27
27
  end
28
+
29
+ def detected
30
+ ENV.key?('HEROKU_TEST_RUN_ID') ? self.class : nil
31
+ end
32
+
33
+ def fixed_queue_split
34
+ false
35
+ end
28
36
  end
29
37
  end
30
38
  end
@@ -26,6 +26,14 @@ module KnapsackPro
26
26
  def project_dir
27
27
  ENV['SEMAPHORE_PROJECT_DIR']
28
28
  end
29
+
30
+ def detected
31
+ ENV.key?('SEMAPHORE_BUILD_NUMBER') ? self.class : nil
32
+ end
33
+
34
+ def fixed_queue_split
35
+ false
36
+ end
29
37
  end
30
38
  end
31
39
  end
@@ -29,6 +29,15 @@ module KnapsackPro
29
29
  "#{ENV['HOME']}/#{ENV['SEMAPHORE_GIT_DIR']}"
30
30
  end
31
31
  end
32
+
33
+ def detected
34
+ # check 2 keys to be sure we are using Semaphore 2.0
35
+ ENV.key?('SEMAPHORE') && ENV.key?('SEMAPHORE_WORKFLOW_ID') ? self.class : nil
36
+ end
37
+
38
+ def fixed_queue_split
39
+ false
40
+ end
32
41
  end
33
42
  end
34
43
  end
@@ -17,6 +17,14 @@ module KnapsackPro
17
17
  def project_dir
18
18
  ENV['TRAVIS_BUILD_DIR']
19
19
  end
20
+
21
+ def detected
22
+ ENV.key?('TRAVIS') ? self.class : nil
23
+ end
24
+
25
+ def fixed_queue_split
26
+ true
27
+ end
20
28
  end
21
29
  end
22
30
  end
@@ -186,7 +186,16 @@ module KnapsackPro
186
186
  end
187
187
 
188
188
  def fixed_queue_split
189
- ENV.fetch('KNAPSACK_PRO_FIXED_QUEUE_SPLIT', false)
189
+ @fixed_queue_split ||= begin
190
+ env_name = 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT'
191
+ computed = ENV.fetch(env_name, ci_env_for(:fixed_queue_split)).to_s
192
+
193
+ if !ENV.key?(env_name)
194
+ KnapsackPro.logger.info("#{env_name} is not set. Using default value: #{computed}. Learn more at #{KnapsackPro::Urls::FIXED_QUEUE_SPLIT}")
195
+ end
196
+
197
+ computed
198
+ end
190
199
  end
191
200
 
192
201
  def fixed_queue_split?
@@ -246,17 +255,17 @@ module KnapsackPro
246
255
  end
247
256
 
248
257
  def ci_env_for(env_name)
249
- value = nil
250
- ci_list = KnapsackPro::Config::CI.constants - [:Base, :GitlabCI]
251
- # load GitLab CI first to avoid edge case with order of loading envs for CI_NODE_INDEX
252
- ci_list = [:GitlabCI] + ci_list
253
- ci_list.each do |ci_name|
254
- ci_class = Object.const_get("KnapsackPro::Config::CI::#{ci_name}")
255
- ci = ci_class.new
256
- value = ci.send(env_name)
257
- break unless value.nil?
258
+ detected_ci.new.send(env_name)
259
+ end
260
+
261
+ def detected_ci
262
+ detected = KnapsackPro::Config::CI.constants.map do |constant|
263
+ Object.const_get("KnapsackPro::Config::CI::#{constant}").new.detected
258
264
  end
259
- value
265
+ .compact
266
+ .first
267
+
268
+ detected || KnapsackPro::Config::CI::Base
260
269
  end
261
270
 
262
271
  def log_level
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '4.1.0'
2
+ VERSION = '5.0.0'
3
3
  end
@@ -3,6 +3,11 @@ require 'knapsack_pro'
3
3
  namespace :knapsack_pro do
4
4
  namespace :queue do
5
5
  task :cucumber, [:cucumber_args] do |_, args|
6
+ Kernel.system("RAILS_ENV=test RACK_ENV=test #{$PROGRAM_NAME} 'knapsack_pro:queue:cucumber_go[#{args[:cucumber_args]}]'")
7
+ Kernel.exit($?.exitstatus)
8
+ end
9
+
10
+ task :cucumber_go, [:cucumber_args] do |_, args|
6
11
  KnapsackPro::Runners::Queue::CucumberRunner.run(args[:cucumber_args])
7
12
  end
8
13
  end
@@ -3,6 +3,11 @@ require 'knapsack_pro'
3
3
  namespace :knapsack_pro do
4
4
  namespace :queue do
5
5
  task :minitest, [:minitest_args] do |_, args|
6
+ Kernel.system("RAILS_ENV=test RACK_ENV=test #{$PROGRAM_NAME} 'knapsack_pro:queue:minitest_go[#{args[:minitest_args]}]'")
7
+ Kernel.exit($?.exitstatus)
8
+ end
9
+
10
+ task :minitest_go, [:minitest_args] do |_, args|
6
11
  KnapsackPro::Runners::Queue::MinitestRunner.run(args[:minitest_args])
7
12
  end
8
13
  end
@@ -3,6 +3,11 @@ require 'knapsack_pro'
3
3
  namespace :knapsack_pro do
4
4
  namespace :queue do
5
5
  task :rspec, [:rspec_args] do |_, args|
6
+ Kernel.system("RAILS_ENV=test RACK_ENV=test #{$PROGRAM_NAME} 'knapsack_pro:queue:rspec_go[#{args[:rspec_args]}]'")
7
+ Kernel.exit($?.exitstatus)
8
+ end
9
+
10
+ task :rspec_go, [:rspec_args] do |_, args|
6
11
  KnapsackPro::Runners::Queue::RSpecRunner.run(args[:rspec_args])
7
12
  end
8
13
  end
@@ -632,20 +632,6 @@ describe KnapsackPro::Config::Env do
632
632
  end
633
633
  end
634
634
 
635
- describe '.fixed_test_suite_split' do
636
- subject { described_class.fixed_test_suite_split }
637
-
638
- context 'when ENV exists' do
639
- before { stub_const("ENV", { 'KNAPSACK_PRO_FIXED_TEST_SUITE_SPLIT' => false }) }
640
- it { should eq false }
641
- end
642
-
643
- context "when ENV doesn't exist" do
644
- before { stub_const("ENV", {}) }
645
- it { should be true }
646
- end
647
- end
648
-
649
635
  describe '.fixed_test_suite_split?' do
650
636
  subject { described_class.fixed_test_suite_split? }
651
637
 
@@ -667,38 +653,94 @@ describe KnapsackPro::Config::Env do
667
653
  end
668
654
  end
669
655
 
670
- describe '.fixed_queue_split' do
671
- subject { described_class.fixed_queue_split }
672
-
673
- context 'when ENV exists' do
674
- before { stub_const("ENV", { 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT' => true }) }
675
- it { should eq true }
676
- end
677
-
678
- context "when ENV doesn't exist" do
679
- before { stub_const("ENV", {}) }
680
- it { should be false }
681
- end
682
- end
683
-
684
656
  describe '.fixed_queue_split?' do
685
657
  subject { described_class.fixed_queue_split? }
658
+ after(:each) { described_class.remove_instance_variable(:@fixed_queue_split) }
686
659
 
687
660
  context 'when ENV exists' do
688
- context 'when KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true' do
689
- before { stub_const("ENV", { 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT' => 'true' }) }
690
- it { should be true }
661
+ context 'when KNAPSACK_PRO_FIXED_QUEUE_SPLIT=false' do
662
+ [
663
+ ['AppVeyor', { 'APPVEYOR' => '123' }],
664
+ ['Buildkite', { 'BUILDKITE' => 'true' }],
665
+ ['CircleCI', { 'CIRCLECI' => 'true' }],
666
+ ['Cirrus CI', { 'CIRRUS_CI' => 'true' }],
667
+ ['Codefresh', { 'CF_BUILD_ID' => '123' }],
668
+ ['Codeship', { 'CI_NAME' => 'codeship' }],
669
+ ['GitHub Actions', { 'GITHUB_ACTIONS' => 'true' }],
670
+ ['GitLab CI', { 'GITLAB_CI' => 'true' }],
671
+ ['Heroku CI', { 'HEROKU_TEST_RUN_ID' => '123' }],
672
+ ['Semaphore CI 1.0', { 'SEMAPHORE_BUILD_NUMBER' => '123' }],
673
+ ['Semaphore CI 2.0', { 'SEMAPHORE' => 'true', 'SEMAPHORE_WORKFLOW_ID' => '123' }],
674
+ ['Travis CI', { 'TRAVIS' => 'true' }],
675
+ ['Unsupported', {}],
676
+ ].each do |ci, env|
677
+ it "on #{ci} it is false" do
678
+ logger = instance_double(Logger)
679
+ allow(KnapsackPro).to receive(:logger).and_return(logger)
680
+ expect(logger).not_to receive(:info)
681
+
682
+ stub_const("ENV", env.merge({ 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT' => 'false' }))
683
+
684
+ expect(subject).to eq(false)
685
+ end
686
+ end
691
687
  end
692
688
 
693
- context 'when KNAPSACK_PRO_FIXED_QUEUE_SPLIT=false' do
694
- before { stub_const("ENV", { 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT' => 'false' }) }
695
- it { should be false }
689
+ context 'when KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true' do
690
+ [
691
+ ['AppVeyor', { 'APPVEYOR' => '123' }],
692
+ ['Buildkite', { 'BUILDKITE' => 'true' }],
693
+ ['CircleCI', { 'CIRCLECI' => 'true' }],
694
+ ['Cirrus CI', { 'CIRRUS_CI' => 'true' }],
695
+ ['Codefresh', { 'CF_BUILD_ID' => '123' }],
696
+ ['Codeship', { 'CI_NAME' => 'codeship' }],
697
+ ['GitHub Actions', { 'GITHUB_ACTIONS' => 'true' }],
698
+ ['GitLab CI', { 'GITLAB_CI' => 'true' }],
699
+ ['Heroku CI', { 'HEROKU_TEST_RUN_ID' => '123' }],
700
+ ['Semaphore CI 1.0', { 'SEMAPHORE_BUILD_NUMBER' => '123' }],
701
+ ['Semaphore CI 2.0', { 'SEMAPHORE' => 'true', 'SEMAPHORE_WORKFLOW_ID' => '123' }],
702
+ ['Travis CI', { 'TRAVIS' => 'true' }],
703
+ ['Unsupported', {}],
704
+ ].each do |ci, env|
705
+ it "on #{ci} it is true" do
706
+ logger = instance_double(Logger)
707
+ allow(KnapsackPro).to receive(:logger).and_return(logger)
708
+ expect(logger).not_to receive(:info)
709
+
710
+ stub_const("ENV", env.merge({ 'KNAPSACK_PRO_FIXED_QUEUE_SPLIT' => 'true' }))
711
+
712
+ expect(subject).to eq(true)
713
+ end
714
+ end
696
715
  end
697
716
  end
698
717
 
699
718
  context "when ENV doesn't exist" do
700
- before { stub_const("ENV", {}) }
701
- it { should be false }
719
+ [
720
+ ['AppVeyor', { 'APPVEYOR' => '123' }, false],
721
+ ['Buildkite', { 'BUILDKITE' => 'true' }, true],
722
+ ['CircleCI', { 'CIRCLECI' => 'true' }, false],
723
+ ['Cirrus CI', { 'CIRRUS_CI' => 'true' }, false],
724
+ ['Codefresh', { 'CF_BUILD_ID' => '123' }, false],
725
+ ['Codeship', { 'CI_NAME' => 'codeship' }, true],
726
+ ['GitHub Actions', { 'GITHUB_ACTIONS' => 'true' }, true],
727
+ ['GitLab CI', { 'GITLAB_CI' => 'true' }, false],
728
+ ['Heroku CI', { 'HEROKU_TEST_RUN_ID' => '123' }, false],
729
+ ['Semaphore CI 1.0', { 'SEMAPHORE_BUILD_NUMBER' => '123' }, false],
730
+ ['Semaphore CI 2.0', { 'SEMAPHORE' => 'true', 'SEMAPHORE_WORKFLOW_ID' => '123' }, false],
731
+ ['Travis CI', { 'TRAVIS' => 'true' }, true],
732
+ ['Unsupported', {}, true],
733
+ ].each do |ci, env, expected|
734
+ it "on #{ci} it is #{expected}" do
735
+ logger = instance_double(Logger)
736
+ expect(KnapsackPro).to receive(:logger).and_return(logger)
737
+ expect(logger).to receive(:info).with("KNAPSACK_PRO_FIXED_QUEUE_SPLIT is not set. Using default value: #{expected}. Learn more at #{KnapsackPro::Urls::FIXED_QUEUE_SPLIT}")
738
+
739
+ stub_const("ENV", env)
740
+
741
+ expect(subject).to eq(expected)
742
+ end
743
+ end
702
744
  end
703
745
  end
704
746
 
@@ -895,57 +937,6 @@ describe KnapsackPro::Config::Env do
895
937
  end
896
938
  end
897
939
 
898
- describe '.ci_env_for' do
899
- let(:env_name) { :node_total }
900
-
901
- subject { described_class.ci_env_for(env_name) }
902
-
903
- context 'when CI has no value for env_name method' do
904
- before do
905
- expect(KnapsackPro::Config::CI::Circle).to receive_message_chain(:new, env_name).and_return(nil)
906
- expect(KnapsackPro::Config::CI::Semaphore).to receive_message_chain(:new, env_name).and_return(nil)
907
- expect(KnapsackPro::Config::CI::Buildkite).to receive_message_chain(:new, env_name).and_return(nil)
908
- end
909
-
910
- it do
911
- expect(subject).to be_nil
912
- end
913
- end
914
-
915
- context 'when CI has value for env_name method' do
916
- let(:circle_env) { double(:circle) }
917
- let(:semaphore_env) { double(:semaphore) }
918
- let(:buildkite_env) { double(:buildkite) }
919
-
920
- before do
921
- allow(KnapsackPro::Config::CI::Circle).to receive_message_chain(:new, env_name).and_return(circle_env)
922
- allow(KnapsackPro::Config::CI::Semaphore).to receive_message_chain(:new, env_name).and_return(semaphore_env)
923
- allow(KnapsackPro::Config::CI::Buildkite).to receive_message_chain(:new, env_name).and_return(buildkite_env)
924
- end
925
-
926
- context do
927
- let(:buildkite_env) { nil }
928
- let(:semaphore_env) { nil }
929
-
930
- it { should eq circle_env }
931
- end
932
-
933
- context do
934
- let(:circle_env) { nil }
935
- let(:buildkite_env) { nil }
936
-
937
- it { should eq semaphore_env }
938
- end
939
-
940
- context do
941
- let(:circle_env) { nil }
942
- let(:semaphore_env) { nil }
943
-
944
- it { should eq buildkite_env }
945
- end
946
- end
947
- end
948
-
949
940
  describe '.log_level' do
950
941
  subject { described_class.log_level }
951
942
 
@@ -1022,4 +1013,28 @@ describe KnapsackPro::Config::Env do
1022
1013
  expect(described_class.test_runner_adapter).to eql 'RSpecAdapter'
1023
1014
  end
1024
1015
  end
1016
+
1017
+ describe '.detected_ci' do
1018
+ [
1019
+ ['AppVeyor', { 'APPVEYOR' => '123' }, KnapsackPro::Config::CI::AppVeyor],
1020
+ ['Buildkite', { 'BUILDKITE' => 'true' }, KnapsackPro::Config::CI::Buildkite],
1021
+ ['CircleCI', { 'CIRCLECI' => 'true' }, KnapsackPro::Config::CI::Circle],
1022
+ ['Cirrus CI', { 'CIRRUS_CI' => 'true' }, KnapsackPro::Config::CI::CirrusCI],
1023
+ ['Codefresh', { 'CF_BUILD_ID' => '123' }, KnapsackPro::Config::CI::Codefresh],
1024
+ ['Codeship', { 'CI_NAME' => 'codeship' }, KnapsackPro::Config::CI::Codeship],
1025
+ ['GitHub Actions', { 'GITHUB_ACTIONS' => 'true' }, KnapsackPro::Config::CI::GithubActions],
1026
+ ['GitLab CI', { 'GITLAB_CI' => 'true' }, KnapsackPro::Config::CI::GitlabCI],
1027
+ ['Heroku CI', { 'HEROKU_TEST_RUN_ID' => '123' }, KnapsackPro::Config::CI::Heroku],
1028
+ ['Semaphore CI 1.0', { 'SEMAPHORE_BUILD_NUMBER' => '123' }, KnapsackPro::Config::CI::Semaphore],
1029
+ ['Semaphore CI 2.0', { 'SEMAPHORE' => 'true', 'SEMAPHORE_WORKFLOW_ID' => '123' }, KnapsackPro::Config::CI::Semaphore2],
1030
+ ['Travis CI', { 'TRAVIS' => 'true' }, KnapsackPro::Config::CI::Travis],
1031
+ ['Unsupported', {}, KnapsackPro::Config::CI::Base],
1032
+ ].each do |ci, env, expected|
1033
+ it "detects #{ci}" do
1034
+ stub_const("ENV", env)
1035
+
1036
+ expect(described_class.detected_ci).to eq(expected)
1037
+ end
1038
+ end
1039
+ end
1025
1040
  end
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: 4.1.0
4
+ version: 5.0.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-05-23 00:00:00.000000000 Z
11
+ date: 2023-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake