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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11036d33c04d07966ab4acadc55b1fb20a885b0e9b0d78fc8cf03fe798b7c3bf
4
- data.tar.gz: 8ddfce179b4f7fce9bd28ae965bf15bec132b26b217326d5ce156e94e21cb145
3
+ metadata.gz: 23f9763190e37db931c1457e71dccca8ef1f9d6fcd99fe50b28b1571366833cc
4
+ data.tar.gz: d93d4734cf560ecc77ae06959562c1fcf1ac61489671f374c3fc8a3e2f2e040a
5
5
  SHA512:
6
- metadata.gz: 4c27910d9850ad2d229864dac8b07cb17d9d23a9bd2d14aa05052b6e95a3e218667b32fb40f711324651d2bcd6ee8d180fc7d743ba5cd3b990908ab05d5c57de
7
- data.tar.gz: a868ac3c2ef9c1fdefc655b2dbb59c8034cc21101717be46400fdeec087bd99c62c43c5357fbba1eccfe8a8cc23b032ee1e9e8eb14e75304357ccbe6a179a32b
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 you test file names and time execution. Those data are stored on KnapsackPro.com server.
723
- If your test file names or branch names are sensitive data then you can encrypt the names before sending them to KnapsackPro.com API.
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
- By default, encryption is disabled because knapsack_pro can use your test files names to prepare better test suite split when the time execution data are not yet collected on KnapsackPro.com server.
726
- When you will enable test file names encryption then your first test suite split may be less optimal than it could be.
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 test file encryption please ensure you are using fresh API key. You should not use the same API key for encrypted and non encrypted test suite.
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
- Next step is to generate salt which will be used to encrypt test files or branch names.
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 generated environment variable `KNAPSACK_PRO_SALT`.
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 environment variable `KNAPSACK_PRO_TEST_FILES_ENCRYPTED=true` to your CI server.
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 encryption hash for particular test file you can check that with the rake task:
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 environment variable `KNAPSACK_PRO_BRANCH_ENCRYPTED=true` to your CI server.
755
+ You need to add the `KNAPSACK_PRO_BRANCH_ENCRYPTED=true` environment variable to your CI server.
768
756
 
769
- Note: there are a few branch names that won't be encrypted because we use them as fallback branches on Knapsack Pro API side to determine time execution for test files during split for newly created branches.
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 encryption excluded branch names](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/lib/knapsack_pro/crypto/branch_encryptor.rb#L4)
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 encryption hash for particular branch then use the rake task:
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 provided as argument to rake task
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
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '3.3.1'
2
+ VERSION = '3.4.0'
3
3
  end
@@ -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
- test_files =
23
- if adapter_class == KnapsackPro::Adapters::RSpecAdapter && KnapsackPro::Config::Env.rspec_split_by_test_examples?
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.3.1
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-07-19 00:00:00.000000000 Z
11
+ date: 2022-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake