test_track_rails_client 4.0.0.alpha27 → 4.0.0.alpha28

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
  SHA1:
3
- metadata.gz: 25d6337d0be0cd4ab5f7bb3206ac57abcf4751a9
4
- data.tar.gz: 607743ae3522be134d2842a65e854e0ea698efd1
3
+ metadata.gz: 29ba553d44c0215e82fb8af22e99d956ae3d52fa
4
+ data.tar.gz: a0c8d8e99538c02f7bd8d1756b4e2dc747cd3aaf
5
5
  SHA512:
6
- metadata.gz: f3580d4074be4b74748b652abb5559b7147fb26bc1e65e81ee012a3524df94452d68d7283440f56a2b566e597507febff35bed687e34383a6c7653a4a8e33398
7
- data.tar.gz: 940014bb4d6506d5f1dabf26924a5d76239b7924f153565170a3444862a8e40651fe5a7962769030c150feef132cc43dfe701cbe14ddc220ae431772b75062b2
6
+ metadata.gz: a90a41c9df4e0a5e570865be36dd10a75e367166a2bd8c9822b20166757b907f5928fd559c2fe9ce0f7de7deebfe31c27bddbcecb6eefc31b761e5adf402c30a
7
+ data.tar.gz: 7a3c051b1b7a485d1a2c1ee1e716aa7dcfe1f52755b537090d039d71b2266456ff0bf00bb70d7529b7fc3a65bf6237973080157d688462a15a32e8d975e2e8c2
@@ -8,14 +8,17 @@ module TestTrackRailsClient::AssignmentHelper
8
8
 
9
9
  assignment_registry.each do |split_name, variant|
10
10
  prefixed_split_name = "#{app_name}.#{split_name}"
11
- if split_registry['splits'].key?(prefixed_split_name)
12
- assignments << { split_name: prefixed_split_name, variant: variant.to_s, unsynced: false }
13
- else
14
- unless split_registry['splits'][split_name]
15
- split_registry['splits'][split_name.to_s] = { weights: { variant.to_s => 100 }, feature_gate: false }
16
- end
17
- assignments << { split_name: split_name.to_s, variant: variant.to_s, unsynced: false }
18
- end
11
+ split_name = if split_registry['splits'].key?(prefixed_split_name)
12
+ prefixed_split_name
13
+ else
14
+ split_name.to_s
15
+ end
16
+
17
+ split_registry['splits'][split_name] = {
18
+ weights: { variant.to_s => 100 },
19
+ feature_gate: split_name.end_with?('_enabled')
20
+ }
21
+ assignments << { split_name: split_name, variant: variant.to_s, unsynced: false }
19
22
  end
20
23
 
21
24
  visitor_attributes = { id: "fake_visitor_id", assignments: assignments }
@@ -1,3 +1,3 @@
1
1
  module TestTrackRailsClient
2
- VERSION = "4.0.0.alpha27" # rubocop:disable Style/MutableConstant
2
+ VERSION = "4.0.0.alpha28" # rubocop:disable Style/MutableConstant
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_track_rails_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha27
4
+ version: 4.0.0.alpha28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan O'Neill
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-06-21 00:00:00.000000000 Z
16
+ date: 2019-07-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: delayed_job