knapsack_pro 5.4.1 → 5.6.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 +5 -1
- data/CHANGELOG.md +20 -0
- data/lib/knapsack_pro/adapters/base_adapter.rb +2 -0
- data/lib/knapsack_pro/adapters/cucumber_adapter.rb +2 -0
- data/lib/knapsack_pro/adapters/minitest_adapter.rb +2 -0
- data/lib/knapsack_pro/adapters/rspec_adapter.rb +2 -0
- data/lib/knapsack_pro/adapters/spinach_adapter.rb +2 -0
- data/lib/knapsack_pro/adapters/test_unit_adapter.rb +2 -0
- data/lib/knapsack_pro/allocator.rb +2 -0
- data/lib/knapsack_pro/allocator_builder.rb +2 -0
- data/lib/knapsack_pro/base_allocator_builder.rb +2 -0
- data/lib/knapsack_pro/build_distribution_fetcher.rb +2 -0
- data/lib/knapsack_pro/client/api/action.rb +2 -0
- data/lib/knapsack_pro/client/api/v1/base.rb +2 -0
- data/lib/knapsack_pro/client/api/v1/build_distributions.rb +2 -0
- data/lib/knapsack_pro/client/api/v1/build_subsets.rb +2 -0
- data/lib/knapsack_pro/client/api/v1/queues.rb +2 -0
- data/lib/knapsack_pro/client/connection.rb +2 -0
- data/lib/knapsack_pro/config/ci/app_veyor.rb +6 -0
- data/lib/knapsack_pro/config/ci/base.rb +2 -0
- data/lib/knapsack_pro/config/ci/buildkite.rb +2 -0
- data/lib/knapsack_pro/config/ci/circle.rb +2 -0
- data/lib/knapsack_pro/config/ci/cirrus_ci.rb +6 -0
- data/lib/knapsack_pro/config/ci/codefresh.rb +6 -0
- data/lib/knapsack_pro/config/ci/codeship.rb +6 -0
- data/lib/knapsack_pro/config/ci/github_actions.rb +2 -0
- data/lib/knapsack_pro/config/ci/gitlab_ci.rb +2 -0
- data/lib/knapsack_pro/config/ci/heroku.rb +6 -0
- data/lib/knapsack_pro/config/ci/semaphore.rb +4 -0
- data/lib/knapsack_pro/config/ci/semaphore2.rb +6 -0
- data/lib/knapsack_pro/config/ci/travis.rb +6 -0
- data/lib/knapsack_pro/config/env.rb +2 -0
- data/lib/knapsack_pro/config/env_generator.rb +2 -0
- data/lib/knapsack_pro/config/temp_files.rb +8 -4
- data/lib/knapsack_pro/crypto/branch_encryptor.rb +2 -0
- data/lib/knapsack_pro/crypto/decryptor.rb +2 -0
- data/lib/knapsack_pro/crypto/digestor.rb +2 -0
- data/lib/knapsack_pro/crypto/encryptor.rb +2 -0
- data/lib/knapsack_pro/extensions/time.rb +2 -0
- data/lib/knapsack_pro/formatters/rspec_json_formatter.rb +2 -0
- data/lib/knapsack_pro/formatters/rspec_queue_profile_formatter_extension.rb +2 -0
- data/lib/knapsack_pro/formatters/rspec_queue_summary_formatter.rb +2 -0
- data/lib/knapsack_pro/hooks/queue.rb +2 -0
- data/lib/knapsack_pro/logger_wrapper.rb +2 -0
- data/lib/knapsack_pro/mask_string.rb +2 -0
- data/lib/knapsack_pro/presenter.rb +2 -0
- data/lib/knapsack_pro/queue_allocator.rb +2 -0
- data/lib/knapsack_pro/queue_allocator_builder.rb +2 -0
- data/lib/knapsack_pro/railtie.rb +2 -0
- data/lib/knapsack_pro/report.rb +2 -0
- data/lib/knapsack_pro/repository_adapter_initiator.rb +2 -0
- data/lib/knapsack_pro/repository_adapters/base_adapter.rb +2 -0
- data/lib/knapsack_pro/repository_adapters/env_adapter.rb +2 -0
- data/lib/knapsack_pro/repository_adapters/git_adapter.rb +2 -0
- data/lib/knapsack_pro/runners/base_runner.rb +2 -0
- data/lib/knapsack_pro/runners/cucumber_runner.rb +2 -0
- data/lib/knapsack_pro/runners/minitest_runner.rb +2 -0
- data/lib/knapsack_pro/runners/queue/base_runner.rb +2 -0
- data/lib/knapsack_pro/runners/queue/cucumber_runner.rb +2 -0
- data/lib/knapsack_pro/runners/queue/minitest_runner.rb +2 -0
- data/lib/knapsack_pro/runners/queue/rspec_runner.rb +2 -0
- data/lib/knapsack_pro/runners/rspec_runner.rb +2 -0
- data/lib/knapsack_pro/runners/spinach_runner.rb +2 -0
- data/lib/knapsack_pro/runners/test_unit_runner.rb +2 -0
- data/lib/knapsack_pro/slow_test_file_determiner.rb +2 -0
- data/lib/knapsack_pro/slow_test_file_finder.rb +2 -0
- data/lib/knapsack_pro/task_loader.rb +2 -0
- data/lib/knapsack_pro/test_case_detectors/rspec_test_example_detector.rb +2 -0
- data/lib/knapsack_pro/test_case_mergers/base_merger.rb +2 -0
- data/lib/knapsack_pro/test_case_mergers/rspec_merger.rb +2 -0
- data/lib/knapsack_pro/test_file_cleaner.rb +2 -0
- data/lib/knapsack_pro/test_file_finder.rb +2 -0
- data/lib/knapsack_pro/test_file_pattern.rb +2 -0
- data/lib/knapsack_pro/test_file_presenter.rb +2 -0
- data/lib/knapsack_pro/test_files_with_test_cases_composer.rb +2 -0
- data/lib/knapsack_pro/test_flat_distributor.rb +2 -0
- data/lib/knapsack_pro/tracker.rb +2 -0
- data/lib/knapsack_pro/utils.rb +2 -0
- data/lib/knapsack_pro/version.rb +3 -1
- data/lib/knapsack_pro.rb +2 -0
- data/lib/tasks/cucumber.rake +2 -0
- data/lib/tasks/encrypted_branch_names.rake +2 -0
- data/lib/tasks/encrypted_test_file_names.rake +2 -0
- data/lib/tasks/minitest.rake +2 -0
- data/lib/tasks/queue/cucumber.rake +2 -0
- data/lib/tasks/queue/minitest.rake +2 -0
- data/lib/tasks/queue/rspec.rake +2 -0
- data/lib/tasks/rspec.rake +2 -0
- data/lib/tasks/salt.rake +2 -0
- data/lib/tasks/spinach.rake +2 -0
- data/lib/tasks/test_unit.rake +2 -0
- data/spec/knapsack_pro/config/ci/app_veyor_spec.rb +14 -0
- data/spec/knapsack_pro/config/ci/codefresh_spec.rb +15 -0
- data/spec/knapsack_pro/config/ci/codeship_spec.rb +14 -0
- data/spec/knapsack_pro/config/env_spec.rb +1 -1
- 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: fa2ae33f8d962bbd8d5f1639e050f2a43e9ad28bf655d637d43ca2c23bc1d7d3
|
4
|
+
data.tar.gz: 70e747f428235b65bba04ed2f748221170a6971e8982e0ab0fbbdb60177d9a94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed58c0b63af2f3301e7233c142da4165a9c2c9a4f31987d465a803d3b4fdab590137d2ef71bbf6b80b9abc95f513cea605091b5caa7fcd0598620790977cc29b
|
7
|
+
data.tar.gz: 607af355f302481ca595f577428ea49565e711a790c284d7fb595f0f15106070a99e85acf4ebd5cf0e073e672ee37f9d851eb2b464c372dca550bf5c878c8050
|
data/.circleci/config.yml
CHANGED
@@ -30,10 +30,14 @@ jobs:
|
|
30
30
|
command: |
|
31
31
|
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
32
32
|
|
33
|
+
- run: gem install rubocop
|
34
|
+
|
33
35
|
- save_cache:
|
34
36
|
paths:
|
35
37
|
- ./vendor/bundle
|
36
38
|
key: v2-dependencies-bundler-{{ checksum "knapsack_pro.gemspec" }}
|
37
39
|
|
38
|
-
#
|
40
|
+
# enforce `frozen_string_literal: true` in the gem files
|
41
|
+
- run: rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment lib/
|
42
|
+
|
39
43
|
- run: bundle exec rspec spec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 5.6.0
|
4
|
+
|
5
|
+
* Use `frozen_string_literal: true` to reduce memory usage
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/220
|
8
|
+
|
9
|
+
* Enforce `frozen_string_literal: true` in the gem files with Rubocop
|
10
|
+
|
11
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/222
|
12
|
+
|
13
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.5.0...v5.6.0
|
14
|
+
|
15
|
+
### 5.5.0
|
16
|
+
|
17
|
+
* Detect user seats for AppVeyor, Codefresh, Codeship
|
18
|
+
|
19
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/221
|
20
|
+
|
21
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.4.1...v5.5.0
|
22
|
+
|
3
23
|
### 5.4.1
|
4
24
|
|
5
25
|
* Fixes RSpec conflict (see https://github.com/KnapsackPro/knapsack_pro-ruby/issues/217)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# https://www.appveyor.com/docs/environment-variables/
|
2
4
|
module KnapsackPro
|
3
5
|
module Config
|
@@ -27,6 +29,10 @@ module KnapsackPro
|
|
27
29
|
ENV['APPVEYOR_BUILD_FOLDER']
|
28
30
|
end
|
29
31
|
|
32
|
+
def user_seat
|
33
|
+
ENV['APPVEYOR_REPO_COMMIT_AUTHOR']
|
34
|
+
end
|
35
|
+
|
30
36
|
def detected
|
31
37
|
ENV.key?('APPVEYOR') ? self.class : nil
|
32
38
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module KnapsackPro
|
2
4
|
module Config
|
3
5
|
module CI
|
@@ -26,6 +28,10 @@ module KnapsackPro
|
|
26
28
|
ENV['CIRRUS_WORKING_DIR']
|
27
29
|
end
|
28
30
|
|
31
|
+
def user_seat
|
32
|
+
# not provided
|
33
|
+
end
|
34
|
+
|
29
35
|
def detected
|
30
36
|
ENV.key?('CIRRUS_CI') ? self.class : nil
|
31
37
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# https://codefresh.io/docs/docs/codefresh-yaml/variables/#system-provided-variables
|
2
4
|
module KnapsackPro
|
3
5
|
module Config
|
@@ -27,6 +29,10 @@ module KnapsackPro
|
|
27
29
|
# not provided
|
28
30
|
end
|
29
31
|
|
32
|
+
def user_seat
|
33
|
+
ENV['CF_BUILD_INITIATOR']
|
34
|
+
end
|
35
|
+
|
30
36
|
def detected
|
31
37
|
ENV.key?('CF_BUILD_ID') ? self.class : nil
|
32
38
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module KnapsackPro
|
2
4
|
module Config
|
3
5
|
module CI
|
@@ -26,6 +28,10 @@ module KnapsackPro
|
|
26
28
|
# not provided
|
27
29
|
end
|
28
30
|
|
31
|
+
def user_seat
|
32
|
+
ENV['CI_COMMITTER_NAME']
|
33
|
+
end
|
34
|
+
|
29
35
|
def detected
|
30
36
|
ENV['CI_NAME'] == 'codeship' ? self.class : nil
|
31
37
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module KnapsackPro
|
2
4
|
module Config
|
3
5
|
module CI
|
@@ -26,6 +28,10 @@ module KnapsackPro
|
|
26
28
|
'/app' if node_build_id
|
27
29
|
end
|
28
30
|
|
31
|
+
def user_seat
|
32
|
+
# not provided
|
33
|
+
end
|
34
|
+
|
29
35
|
def detected
|
30
36
|
ENV.key?('HEROKU_TEST_RUN_ID') ? self.class : nil
|
31
37
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# https://docs.semaphoreci.com/article/12-environment-variables
|
2
4
|
module KnapsackPro
|
3
5
|
module Config
|
@@ -30,6 +32,10 @@ module KnapsackPro
|
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
35
|
+
def user_seat
|
36
|
+
# not provided
|
37
|
+
end
|
38
|
+
|
33
39
|
def detected
|
34
40
|
# check 2 keys to be sure we are using Semaphore 2.0
|
35
41
|
ENV.key?('SEMAPHORE') && ENV.key?('SEMAPHORE_WORKFLOW_ID') ? self.class : nil
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module KnapsackPro
|
2
4
|
module Config
|
3
5
|
module CI
|
@@ -18,6 +20,10 @@ module KnapsackPro
|
|
18
20
|
ENV['TRAVIS_BUILD_DIR']
|
19
21
|
end
|
20
22
|
|
23
|
+
def user_seat
|
24
|
+
# not provided
|
25
|
+
end
|
26
|
+
|
21
27
|
def detected
|
22
28
|
ENV.key?('TRAVIS') ? self.class : nil
|
23
29
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module KnapsackPro
|
2
4
|
module Config
|
3
5
|
class TempFiles
|
@@ -22,10 +24,12 @@ module KnapsackPro
|
|
22
24
|
end
|
23
25
|
|
24
26
|
def self.gitignore_file_content
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
<<~GITIGNORE
|
28
|
+
# This directory is used by knapsack_pro gem for storing temporary files during tests runtime.
|
29
|
+
# Ignore all files, and do not commit this directory into your repository.
|
30
|
+
# Learn more at https://knapsackpro.com
|
31
|
+
*
|
32
|
+
GITIGNORE
|
29
33
|
end
|
30
34
|
|
31
35
|
def self.create_gitignore_file!
|
data/lib/knapsack_pro/railtie.rb
CHANGED
data/lib/knapsack_pro/report.rb
CHANGED
data/lib/knapsack_pro/tracker.rb
CHANGED
data/lib/knapsack_pro/utils.rb
CHANGED
data/lib/knapsack_pro/version.rb
CHANGED
data/lib/knapsack_pro.rb
CHANGED
data/lib/tasks/cucumber.rake
CHANGED
data/lib/tasks/minitest.rake
CHANGED
data/lib/tasks/queue/rspec.rake
CHANGED
data/lib/tasks/rspec.rake
CHANGED
data/lib/tasks/salt.rake
CHANGED
data/lib/tasks/spinach.rake
CHANGED
data/lib/tasks/test_unit.rake
CHANGED
@@ -70,4 +70,18 @@ describe KnapsackPro::Config::CI::AppVeyor do
|
|
70
70
|
it { should be nil }
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
describe '#user_seat' do
|
75
|
+
subject { described_class.new.user_seat }
|
76
|
+
|
77
|
+
context 'when the APPVEYOR_REPO_COMMIT_AUTHOR environment variable exists' do
|
78
|
+
let(:env) { { 'APPVEYOR_REPO_COMMIT_AUTHOR' => 'jane_doe' } }
|
79
|
+
|
80
|
+
it { should eql 'jane_doe' }
|
81
|
+
end
|
82
|
+
|
83
|
+
context "when the APPVEYOR_REPO_COMMIT_AUTHOR environment variable doesn't exist" do
|
84
|
+
it { should be nil }
|
85
|
+
end
|
86
|
+
end
|
73
87
|
end
|
@@ -63,4 +63,19 @@ describe KnapsackPro::Config::CI::Codefresh do
|
|
63
63
|
|
64
64
|
it { should be nil }
|
65
65
|
end
|
66
|
+
|
67
|
+
|
68
|
+
describe '#user_seat' do
|
69
|
+
subject { described_class.new.user_seat }
|
70
|
+
|
71
|
+
context 'when the CF_BUILD_INITIATOR environment variable exists' do
|
72
|
+
let(:env) { { 'CF_BUILD_INITIATOR' => 'jane_doe' } }
|
73
|
+
|
74
|
+
it { should eql 'jane_doe' }
|
75
|
+
end
|
76
|
+
|
77
|
+
context "when the CF_BUILD_INITIATOR environment variable doesn't exist" do
|
78
|
+
it { should be nil }
|
79
|
+
end
|
80
|
+
end
|
66
81
|
end
|
@@ -63,4 +63,18 @@ describe KnapsackPro::Config::CI::Codeship do
|
|
63
63
|
|
64
64
|
it { should be nil }
|
65
65
|
end
|
66
|
+
|
67
|
+
describe '#user_seat' do
|
68
|
+
subject { described_class.new.user_seat }
|
69
|
+
|
70
|
+
context 'when the CI_COMMITTER_NAME environment variable exists' do
|
71
|
+
let(:env) { { 'CI_COMMITTER_NAME' => 'jane_doe' } }
|
72
|
+
|
73
|
+
it { should eql 'jane_doe' }
|
74
|
+
end
|
75
|
+
|
76
|
+
context "when the CI_COMMITTER_NAME environment variable doesn't exist" do
|
77
|
+
it { should be nil }
|
78
|
+
end
|
79
|
+
end
|
66
80
|
end
|
@@ -1082,7 +1082,7 @@ describe KnapsackPro::Config::Env do
|
|
1082
1082
|
['Other', { 'CI' => 'true'}],
|
1083
1083
|
[nil, {}],
|
1084
1084
|
].each do |ci, env|
|
1085
|
-
it "detects #{ci}
|
1085
|
+
it "detects #{ci || 'missing CI from env or development'}" do
|
1086
1086
|
stub_const("ENV", env)
|
1087
1087
|
|
1088
1088
|
expect(described_class.ci_provider).to eq(ci)
|
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: 5.
|
4
|
+
version: 5.6.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-08-
|
11
|
+
date: 2023-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|