test_track_rails_client 8.3.0 → 8.5.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 681b22241706e0cfa2bd39185caeb5a69705f530382173c2518bb5018a663df1
|
|
4
|
+
data.tar.gz: b5b3b10ddd349be7cd4eb59b33805484e39ed1c00c6257bd7ec597dc813366c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa2a384138a145c1f711b4379f8b651c12c9cc1f7991618806ce9d0ca38b77b8279e06320fb3e15692c9a0ece437ac09226fd4fefa3d278b1e14dd08146d4eb1
|
|
7
|
+
data.tar.gz: 4b2fe01b15fbbda9b1dced89ca02808dec6d65337d1bfaaaf54f9881242a33551e7b8b2910a156822bd5cff74d0991a60894212dbca420ed568905a26a3ff765
|
|
@@ -15,6 +15,12 @@ module TestTrack::Controller
|
|
|
15
15
|
raise ActionController::RoutingError, 'Not Found' unless test_track_visitor.ab(feature_flag, context: self.class.name.underscore)
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
def reject_feature_flag(feature_flag, *args)
|
|
20
|
+
before_action(*args) do
|
|
21
|
+
raise ActionController::RoutingError, 'Not Found' if test_track_visitor.ab(feature_flag, context: self.class.name.underscore)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
private
|
|
@@ -37,16 +37,26 @@ class TestTrack::Fake::SplitRegistry
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def _schema_registry
|
|
40
|
-
file =
|
|
41
|
-
|
|
40
|
+
file =
|
|
41
|
+
if File.exist?(schema_json_path)
|
|
42
|
+
JSON.parse(File.read(schema_json_path))
|
|
43
|
+
elsif File.exist?(schema_yml_path)
|
|
44
|
+
YAML.load_file(schema_yml_path)
|
|
45
|
+
end
|
|
46
|
+
|
|
42
47
|
file && file['splits'].each_with_object(ActiveSupport::HashWithIndifferentAccess.new) do |split, h|
|
|
43
48
|
h[split['name']] = split['weights']
|
|
44
49
|
end
|
|
45
50
|
end
|
|
46
51
|
|
|
52
|
+
def schema_json_path
|
|
53
|
+
base = ENV['TEST_TRACK_SCHEMA_ROOT'] || Rails.root
|
|
54
|
+
File.join(base, 'testtrack/schema.json')
|
|
55
|
+
end
|
|
56
|
+
|
|
47
57
|
def schema_yml_path
|
|
48
58
|
base = ENV['TEST_TRACK_SCHEMA_ROOT'] || Rails.root
|
|
49
|
-
File.join(base, 'testtrack
|
|
59
|
+
File.join(base, 'testtrack/schema.yml')
|
|
50
60
|
end
|
|
51
61
|
|
|
52
62
|
def legacy_test_track_schema_yml
|
data/lib/testtrack_cli.rb
CHANGED
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: 8.
|
|
4
|
+
version: 8.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan O'Neill
|
|
@@ -455,7 +455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
455
455
|
- !ruby/object:Gem::Version
|
|
456
456
|
version: '0'
|
|
457
457
|
requirements: []
|
|
458
|
-
rubygems_version:
|
|
458
|
+
rubygems_version: 4.0.6
|
|
459
459
|
specification_version: 4
|
|
460
460
|
summary: Rails client for TestTrack
|
|
461
461
|
test_files: []
|