knapsack_pro 3.3.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +18 -30
- data/lib/knapsack_pro/version.rb +1 -1
- data/lib/tasks/encrypted_test_file_names.rake +2 -9
- 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: 23f9763190e37db931c1457e71dccca8ef1f9d6fcd99fe50b28b1571366833cc
|
4
|
+
data.tar.gz: d93d4734cf560ecc77ae06959562c1fcf1ac61489671f374c3fc8a3e2f2e040a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 254b42538b48ef6483e2479e4db2f5619389df83496443b6924a6953b2d49485563615888864cb0ec3696cb36e2f0338873294ffa559461076ba4033929134bc
|
7
|
+
data.tar.gz: 310f6d28741d8631bba32b205e0f4a86a47b775f0c8f732a272ecf1151c88b2ca46e1975657f5fa5dcaaefefbaa2b2668b9e65e876addf838aa4013e83770723
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 3.4.0
|
4
|
+
|
5
|
+
* Update documentation and code because the encryption feature does not work with the RSpec split by examples feature
|
6
|
+
|
7
|
+
Update docs: https://github.com/KnapsackPro/knapsack_pro-ruby/pull/176
|
8
|
+
|
9
|
+
Update code: https://github.com/KnapsackPro/knapsack_pro-ruby/pull/177
|
10
|
+
|
11
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v3.3.1...v3.4.0
|
12
|
+
|
3
13
|
### 3.3.1
|
4
14
|
|
5
15
|
* Skip loading a test file path for Minitest in Queue Mode when it does not exist on the disk
|
data/README.md
CHANGED
@@ -97,7 +97,6 @@ The knapsack_pro has also [queue mode](#queue-mode) to get an optimal test suite
|
|
97
97
|
- [Test file names encryption](#test-file-names-encryption)
|
98
98
|
- [How to enable test file names encryption?](#how-to-enable-test-file-names-encryption)
|
99
99
|
- [How to debug test file names?](#how-to-debug-test-file-names)
|
100
|
-
- [Preview encrypted RSpec test example paths?](#preview-encrypted-rspec-test-example-paths)
|
101
100
|
- [How to enable branch names encryption?](#how-to-enable-branch-names-encryption)
|
102
101
|
- [How to debug branch names?](#how-to-debug-branch-names)
|
103
102
|
- [Supported CI providers](#supported-ci-providers)
|
@@ -719,72 +718,61 @@ This is optional way of using knapsack_pro when you don't want to add it to `Gem
|
|
719
718
|
|
720
719
|
### Test file names encryption
|
721
720
|
|
722
|
-
knapsack_pro gem collects information about
|
723
|
-
If your test file names or branch names are sensitive data then you can encrypt the
|
721
|
+
The knapsack_pro gem collects information about your test file names, branch names, and execution times. The data are stored on the KnapsackPro.com server.
|
722
|
+
If your test file names or branch names are considered sensitive data, then you can encrypt the data before sending it to the KnapsackPro.com API.
|
724
723
|
|
725
|
-
|
726
|
-
When you
|
724
|
+
Encryption is disabled by default because the knapsack_pro gem uses your test file names to prepare a better test suite split when the execution time data are not collected on the KnapsackPro.com server yet.
|
725
|
+
When you enable the encryption, then your first test suite split may not be optimal.
|
727
726
|
|
728
|
-
Each test file name is generated with `Digest::SHA2.hexdigest` method and 64 chars salt.
|
727
|
+
Each test file name is generated with the `Digest::SHA2.hexdigest` method and 64 chars salt.
|
729
728
|
|
730
|
-
Before you enable
|
731
|
-
You can generate API key for your test suite in [your dashboard](https://knapsackpro.com).
|
729
|
+
Before you enable encryption, please ensure you are using a fresh API token. Do not use the same API token for the encrypted and non-encrypted test suite. You can generate an API token for your test suite in the [user dashboard](https://knapsackpro.com/dashboard).
|
732
730
|
|
733
|
-
|
731
|
+
The next step is to generate a salt to encrypt test files or branch names with it.
|
734
732
|
|
735
733
|
```bash
|
736
734
|
bundle exec rake knapsack_pro:salt
|
737
735
|
```
|
738
736
|
|
739
|
-
Add to your CI server
|
737
|
+
Add the salt to your CI server as the `KNAPSACK_PRO_SALT` environment variable.
|
740
738
|
|
741
739
|
#### How to enable test file names encryption?
|
742
740
|
|
743
|
-
You need to add
|
741
|
+
You need to add the `KNAPSACK_PRO_TEST_FILES_ENCRYPTED=true` environment variable to your CI server.
|
744
742
|
|
745
743
|
#### How to debug test file names?
|
746
744
|
|
747
|
-
If you need to check what is the
|
745
|
+
If you need to check what is the hash value for a particular test file you can check that with the rake task:
|
748
746
|
|
749
747
|
```bash
|
750
|
-
KNAPSACK_PRO_SALT=xxx bundle exec rake knapsack_pro:encrypted_test_file_names[rspec]
|
748
|
+
KNAPSACK_PRO_SALT=xxx bundle exec rake "knapsack_pro:encrypted_test_file_names[rspec]"
|
751
749
|
```
|
752
750
|
|
753
|
-
You can pass the name of test runner like `rspec`, `minitest`, `test_unit`, `cucumber`, `spinach` as argument to rake task.
|
754
|
-
|
755
|
-
##### Preview encrypted RSpec test example paths?
|
756
|
-
|
757
|
-
If you split RSpec tests by test examples (by individual `it`) you can preview encrypted test example paths this way:
|
758
|
-
|
759
|
-
```bash
|
760
|
-
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true \
|
761
|
-
KNAPSACK_PRO_SALT=xxx \
|
762
|
-
bundle exec rake knapsack_pro:encrypted_test_file_names[rspec]
|
763
|
-
```
|
751
|
+
You can pass the name of a test runner like `rspec`, `minitest`, `test_unit`, `cucumber`, `spinach` as an argument to the rake task.
|
764
752
|
|
765
753
|
#### How to enable branch names encryption?
|
766
754
|
|
767
|
-
You need to add
|
755
|
+
You need to add the `KNAPSACK_PRO_BRANCH_ENCRYPTED=true` environment variable to your CI server.
|
768
756
|
|
769
|
-
Note
|
757
|
+
Note a few branch names won't be encrypted because we use them as fallback branches on the Knapsack Pro API side to determine time execution for test files during split for newly created branches.
|
770
758
|
|
771
759
|
* develop
|
772
760
|
* development
|
773
761
|
* dev
|
774
762
|
* master
|
775
763
|
* staging
|
776
|
-
* [see full list of
|
764
|
+
* [see the full list of excluded branch names from encryption](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/lib/knapsack_pro/crypto/branch_encryptor.rb#L4)
|
777
765
|
|
778
766
|
#### How to debug branch names?
|
779
767
|
|
780
|
-
If you need to check what is the
|
768
|
+
If you need to check what is the hash for a particular branch, then use the rake task:
|
781
769
|
|
782
770
|
```bash
|
783
771
|
# show all local branches and respective hashes
|
784
772
|
$ KNAPSACK_PRO_SALT=xxx bundle exec rake knapsack_pro:encrypted_branch_names
|
785
773
|
|
786
|
-
# show hash for branch
|
787
|
-
$ KNAPSACK_PRO_SALT=xxx bundle exec rake knapsack_pro:encrypted_branch_names[not-encrypted-branch-name]
|
774
|
+
# show the hash for a branch name passed as an argument to the rake task
|
775
|
+
$ KNAPSACK_PRO_SALT=xxx bundle exec rake "knapsack_pro:encrypted_branch_names[not-encrypted-branch-name]"
|
788
776
|
```
|
789
777
|
|
790
778
|
### Supported CI providers
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -19,15 +19,8 @@ namespace :knapsack_pro do
|
|
19
19
|
raise('Provide adapter name like rspec, minitest, test_unit, cucumber, spinach')
|
20
20
|
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
detector = KnapsackPro::TestCaseDetectors::RSpecTestExampleDetector.new
|
25
|
-
detector.generate_json_report
|
26
|
-
detector.test_file_example_paths
|
27
|
-
else
|
28
|
-
test_file_pattern = KnapsackPro::TestFilePattern.call(adapter_class)
|
29
|
-
KnapsackPro::TestFileFinder.call(test_file_pattern)
|
30
|
-
end
|
22
|
+
test_file_pattern = KnapsackPro::TestFilePattern.call(adapter_class)
|
23
|
+
test_files = KnapsackPro::TestFileFinder.call(test_file_pattern)
|
31
24
|
|
32
25
|
test_file_names = []
|
33
26
|
test_files.each do |t|
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|