knapsack_pro 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/knapsack_pro/client/api/v1/build_distributions.rb +1 -1
- data/lib/knapsack_pro/client/api/v1/queues.rb +1 -1
- data/lib/knapsack_pro/config/env.rb +3 -2
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/knapsack_pro/client/api/v1/build_distributions_spec.rb +4 -4
- data/spec/knapsack_pro/client/api/v1/queues_spec.rb +5 -5
- data/spec/knapsack_pro/config/env_spec.rb +11 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4e0c8f7bd4c8bf4c50885cdbcbecf34222a3d1ab46d3be52d937d940a0ba5c0
|
4
|
+
data.tar.gz: b8a68e22c872686d20fc6fac50ec3d02bad449768da522eb36ed86db5d331dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34d669379edb42f5a3e3eaf9075320bd1e2457ec48dfae86d94e2fa21eb4562d1fcc2db66ed49749ef78a641741d934e6d978bc9cc557d5985e49eb9bbed133d
|
7
|
+
data.tar.gz: bde90595bb3123c0c10b53d58de5b78637a2c30679f3ab5e37283735ce3a4f6bcbc19a39be7fcf691f6878f5be0018d16e3eb0bc8adc9f2d6f23827de72f0bb2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 5.1.0
|
4
|
+
|
5
|
+
* Mask user seats data instead of hashing it
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/202
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.0.0...v5.1.0
|
10
|
+
|
11
|
+
|
3
12
|
### 5.0.0
|
4
13
|
|
5
14
|
* __(breaking change)__ Use `KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true` as default value in Queue Mode and use `false` for proper CI providers
|
@@ -15,7 +15,7 @@ module KnapsackPro
|
|
15
15
|
:node_total => args.fetch(:node_total),
|
16
16
|
:node_index => args.fetch(:node_index),
|
17
17
|
:ci_build_id => KnapsackPro::Config::Env.ci_node_build_id,
|
18
|
-
:user_seat => KnapsackPro::Config::Env.
|
18
|
+
:user_seat => KnapsackPro::Config::Env.masked_user_seat,
|
19
19
|
}
|
20
20
|
|
21
21
|
unless request_hash[:cache_read_attempt]
|
@@ -16,7 +16,7 @@ module KnapsackPro
|
|
16
16
|
:node_total => args.fetch(:node_total),
|
17
17
|
:node_index => args.fetch(:node_index),
|
18
18
|
:node_build_id => KnapsackPro::Config::Env.ci_node_build_id,
|
19
|
-
:user_seat => KnapsackPro::Config::Env.
|
19
|
+
:user_seat => KnapsackPro::Config::Env.masked_user_seat,
|
20
20
|
}
|
21
21
|
|
22
22
|
if request_hash[:can_initialize_queue] && !request_hash[:attempt_connect_to_queue]
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -6,7 +6,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
6
6
|
let(:node_total) { double }
|
7
7
|
let(:node_index) { double }
|
8
8
|
let(:ci_build_id) { double }
|
9
|
-
let(:
|
9
|
+
let(:masked_user_seat) { double }
|
10
10
|
let(:test_files) { double }
|
11
11
|
|
12
12
|
subject do
|
@@ -23,7 +23,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
23
23
|
before do
|
24
24
|
expect(KnapsackPro::Config::Env).to receive(:fixed_test_suite_split).and_return(fixed_test_suite_split)
|
25
25
|
expect(KnapsackPro::Config::Env).to receive(:ci_node_build_id).and_return(ci_build_id)
|
26
|
-
expect(KnapsackPro::Config::Env).to receive(:
|
26
|
+
expect(KnapsackPro::Config::Env).to receive(:masked_user_seat).and_return(masked_user_seat)
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'when cache_read_attempt=true' do
|
@@ -42,7 +42,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
42
42
|
node_total: node_total,
|
43
43
|
node_index: node_index,
|
44
44
|
ci_build_id: ci_build_id,
|
45
|
-
user_seat:
|
45
|
+
user_seat: masked_user_seat,
|
46
46
|
}
|
47
47
|
}).and_return(action)
|
48
48
|
expect(subject).to eq action
|
@@ -65,7 +65,7 @@ describe KnapsackPro::Client::API::V1::BuildDistributions do
|
|
65
65
|
node_total: node_total,
|
66
66
|
node_index: node_index,
|
67
67
|
ci_build_id: ci_build_id,
|
68
|
-
user_seat:
|
68
|
+
user_seat: masked_user_seat,
|
69
69
|
test_files: test_files
|
70
70
|
}
|
71
71
|
}).and_return(action)
|
@@ -7,7 +7,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
7
7
|
let(:node_index) { double }
|
8
8
|
let(:test_files) { double }
|
9
9
|
let(:node_build_id) { double }
|
10
|
-
let(:
|
10
|
+
let(:masked_user_seat) { double }
|
11
11
|
|
12
12
|
subject do
|
13
13
|
described_class.queue(
|
@@ -24,7 +24,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
24
24
|
before do
|
25
25
|
expect(KnapsackPro::Config::Env).to receive(:fixed_queue_split).and_return(fixed_queue_split)
|
26
26
|
expect(KnapsackPro::Config::Env).to receive(:ci_node_build_id).and_return(node_build_id)
|
27
|
-
expect(KnapsackPro::Config::Env).to receive(:
|
27
|
+
expect(KnapsackPro::Config::Env).to receive(:masked_user_seat).and_return(masked_user_seat)
|
28
28
|
end
|
29
29
|
|
30
30
|
context 'when can_initialize_queue=true and attempt_connect_to_queue=true' do
|
@@ -45,7 +45,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
45
45
|
node_total: node_total,
|
46
46
|
node_index: node_index,
|
47
47
|
node_build_id: node_build_id,
|
48
|
-
user_seat:
|
48
|
+
user_seat: masked_user_seat,
|
49
49
|
}
|
50
50
|
}).and_return(action)
|
51
51
|
expect(subject).to eq action
|
@@ -70,7 +70,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
70
70
|
node_total: node_total,
|
71
71
|
node_index: node_index,
|
72
72
|
node_build_id: node_build_id,
|
73
|
-
user_seat:
|
73
|
+
user_seat: masked_user_seat,
|
74
74
|
test_files: test_files
|
75
75
|
}
|
76
76
|
}).and_return(action)
|
@@ -96,7 +96,7 @@ describe KnapsackPro::Client::API::V1::Queues do
|
|
96
96
|
node_total: node_total,
|
97
97
|
node_index: node_index,
|
98
98
|
node_build_id: node_build_id,
|
99
|
-
user_seat:
|
99
|
+
user_seat: masked_user_seat,
|
100
100
|
}
|
101
101
|
}).and_return(action)
|
102
102
|
expect(subject).to eq action
|
@@ -207,22 +207,26 @@ describe KnapsackPro::Config::Env do
|
|
207
207
|
end
|
208
208
|
end
|
209
209
|
|
210
|
-
describe '.
|
211
|
-
subject { described_class.
|
210
|
+
describe '.masked_seat_hash' do
|
211
|
+
subject { described_class.masked_user_seat }
|
212
212
|
|
213
213
|
before do
|
214
214
|
expect(described_class).to receive(:user_seat).at_least(1).and_return(user_seat)
|
215
215
|
end
|
216
216
|
|
217
|
-
context 'when the user seat
|
217
|
+
context 'when the user seat is a name' do
|
218
218
|
let(:user_seat) { 'John Doe' }
|
219
219
|
|
220
|
-
it
|
221
|
-
|
222
|
-
|
220
|
+
it { expect(subject).to eq 'Jo** Do*' }
|
221
|
+
end
|
222
|
+
|
223
|
+
context 'when the user seat is an e-mail' do
|
224
|
+
let(:user_seat) { 'john.doe@example.com' }
|
225
|
+
|
226
|
+
it { expect(subject).to eq 'jo**.do*@ex*****.co*' }
|
223
227
|
end
|
224
228
|
|
225
|
-
context 'when the user seat
|
229
|
+
context 'when the user seat is nil' do
|
226
230
|
let(:user_seat) { nil }
|
227
231
|
|
228
232
|
it { expect(subject).to be_nil }
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -389,7 +389,7 @@ metadata:
|
|
389
389
|
documentation_uri: https://docs.knapsackpro.com/integration/
|
390
390
|
homepage_uri: https://knapsackpro.com
|
391
391
|
source_code_uri: https://github.com/KnapsackPro/knapsack_pro-ruby
|
392
|
-
post_install_message:
|
392
|
+
post_install_message:
|
393
393
|
rdoc_options: []
|
394
394
|
require_paths:
|
395
395
|
- lib
|
@@ -404,8 +404,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
404
|
- !ruby/object:Gem::Version
|
405
405
|
version: '0'
|
406
406
|
requirements: []
|
407
|
-
rubygems_version: 3.
|
408
|
-
signing_key:
|
407
|
+
rubygems_version: 3.3.7
|
408
|
+
signing_key:
|
409
409
|
specification_version: 4
|
410
410
|
summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel
|
411
411
|
job finish work at a similar time.
|