test_track_rails_client 4.0.0.alpha18 → 4.0.0.alpha19
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f0e3ba5a8b25543717d72ce97b118814bb59106
|
4
|
+
data.tar.gz: e24f6f23172eaffd2f42bbb2225224c61ff8c3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07457a7ca53f7433eca21e33a53fe28a41df6aca0445c8ebce62e08915e120b31ed56f5dbf67a39159b255745ce87a127912c2cea751d6320a2646e8b4a3235c
|
7
|
+
data.tar.gz: f84f8e74c6b82ce0630bc81e7c66c224180053e42125cff661dc468d88d6cd089f8ef79685335aaf77f75903178fcb7904d8a609b7aeb898ddc68a7ddd246d26
|
@@ -18,27 +18,46 @@ class TestTrack::Fake::SplitRegistry
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def split_hash
|
21
|
-
if
|
22
|
-
|
21
|
+
if schema_registry.present?
|
22
|
+
schema_registry
|
23
|
+
elsif legacy_test_track_schema_yml.present?
|
24
|
+
legacy_test_track_schema_yml[:splits]
|
23
25
|
else
|
24
26
|
{}
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
|
-
def
|
29
|
-
unless instance_variable_defined?(:@
|
30
|
-
|
30
|
+
def schema_registry
|
31
|
+
@schema_registry = _schema_registry unless instance_variable_defined?(:@schema_registry)
|
32
|
+
@schema_registry
|
33
|
+
end
|
34
|
+
|
35
|
+
def _schema_registry
|
36
|
+
file = YAML.load_file(schema_yml_path)
|
37
|
+
file && file['splits'].each_with_object(ActiveSupport::HashWithIndifferentAccess.new) do |split, h|
|
38
|
+
h[split['name']] = split['weights']
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def schema_yml_path
|
43
|
+
base = ENV['TEST_TRACK_SCHEMA_ROOT'] || Rails.root
|
44
|
+
File.join(base, 'testtrack', 'schema.yml')
|
45
|
+
end
|
46
|
+
|
47
|
+
def legacy_test_track_schema_yml
|
48
|
+
unless instance_variable_defined?(:@legacy_test_track_schema_yml)
|
49
|
+
@legacy_test_track_schema_yml = _legacy_test_track_schema_yml
|
31
50
|
end
|
32
|
-
@
|
51
|
+
@legacy_test_track_schema_yml
|
33
52
|
end
|
34
53
|
|
35
|
-
def
|
36
|
-
YAML.load_file(
|
54
|
+
def _legacy_test_track_schema_yml
|
55
|
+
YAML.load_file(legacy_test_track_schema_yml_path).with_indifferent_access
|
37
56
|
rescue
|
38
57
|
nil
|
39
58
|
end
|
40
59
|
|
41
|
-
def
|
60
|
+
def legacy_test_track_schema_yml_path
|
42
61
|
ENV["TEST_TRACK_SCHEMA_FILE_PATH"] || Rails.root.join('db', 'test_track_schema.yml')
|
43
62
|
end
|
44
63
|
|
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.
|
4
|
+
version: 4.0.0.alpha19
|
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-05-
|
16
|
+
date: 2019-05-05 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: airbrake
|