test_track_rails_client 4.0.0.alpha25 → 4.0.0.alpha26

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
  SHA1:
3
- metadata.gz: 0243c07bc1167992c34c41d89ba1bd5cb4a90d27
4
- data.tar.gz: d4975092705df3e69539aa92c7c5fc51c6016bd2
3
+ metadata.gz: 596ff103f610714c46450cfe9fd4af2ebad9801d
4
+ data.tar.gz: 16a03db5fd2c1e88e59b3e9faa3e1ab2c9048fb5
5
5
  SHA512:
6
- metadata.gz: 301c7437880df30fa6959299a82eeacc40376779d1478c2b9c9535f5ea11e39fc5feaa5cfe55719090325ff4565bf43a85dbe03fff586d50fc3d0af5e849087b
7
- data.tar.gz: dda56b7b52bfffec82f68ed07e92527e1ef4fd844a0c62f0df42453bafadbba7f481e8497291e34cca4218d024eb32d7cf519cb2a44dde117a9af55797672202
6
+ metadata.gz: 30875ae214ce8afe195a4bc11036d42689c7ff5a8b520921180eb9ae5e9599141520d90c5e97058b65389b62267a13c9185729b72f30e86e7af0be8319c5e1fd
7
+ data.tar.gz: 9991fc8a58eb4f94243632279ba2304979acd46270048d01ba32ec1cd3622844eead1b9e26d4945991b2245c0034c09b7dee4affa4126b6538178270c177ec44
data/Rakefile CHANGED
@@ -32,6 +32,22 @@ task :vendor_deps do
32
32
  sh 'bower install'
33
33
  sh 'cp', 'bower_components/test_track_js_client/dist/testTrack.bundle.min.js', 'app/assets/javascripts'
34
34
 
35
+ # Download testtrack-cli
36
+ TEST_TRACK_CLI_VERSION = 'v0.9.7'.freeze
37
+
38
+ FileUtils.module_eval do
39
+ mkdir_p 'vendor/bin/testtrack-cli'
40
+ cd 'vendor/bin/testtrack-cli' do
41
+ rm_r Dir.glob('*')
42
+
43
+ %w(darwin linux).each do |arch|
44
+ `curl -L https://github.com/Betterment/testtrack-cli/releases/download/#{TEST_TRACK_CLI_VERSION}/testtrack.#{arch} \
45
+ > testtrack.#{arch}`
46
+ chmod 'u=wrx,go=rx', "testtrack.#{arch}"
47
+ end
48
+ end
49
+ end
50
+
35
51
  # Gems
36
52
  FileUtils.module_eval do
37
53
  cd "vendor/gems" do
@@ -1,13 +1,19 @@
1
1
  module TestTrackRailsClient::AssignmentHelper
2
- def stub_test_track_assignments(assignment_registry) # rubocop:disable Metrics/AbcSize
2
+ def stub_test_track_assignments(assignment_registry) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
3
3
  raise "Cannot stub test track assignments when TestTrack is enabled" if TestTrack.enabled?
4
4
 
5
5
  split_registry = TestTrack::Fake::SplitRegistry.instance.to_h.dup
6
6
  assignments = []
7
+ app_name = URI.parse(TestTrack.private_url).user
7
8
 
8
9
  assignment_registry.each do |split_name, variant|
9
- split_registry[split_name] = { variant => 100 } unless split_registry[split_name]
10
- assignments << { split_name: split_name.to_s, variant: variant.to_s, unsynced: false }
10
+ prefixed_split_name = "#{app_name}.#{split_name}"
11
+ if split_registry.key?(prefixed_split_name)
12
+ assignments << { split_name: prefixed_split_name, variant: variant.to_s, unsynced: false }
13
+ else
14
+ split_registry[split_name] = { variant => 100 } unless split_registry[split_name]
15
+ assignments << { split_name: split_name.to_s, variant: variant.to_s, unsynced: false }
16
+ end
11
17
  end
12
18
 
13
19
  visitor_attributes = { id: "fake_visitor_id", assignments: assignments }
@@ -1,3 +1,3 @@
1
1
  module TestTrackRailsClient
2
- VERSION = "4.0.0.alpha25" # rubocop:disable Style/MutableConstant
2
+ VERSION = "4.0.0.alpha26" # 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.alpha25
4
+ version: 4.0.0.alpha26
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-09 00:00:00.000000000 Z
16
+ date: 2019-05-21 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: airbrake
@@ -119,6 +119,20 @@ dependencies:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
121
  version: '1.4'
122
+ - !ruby/object:Gem::Dependency
123
+ name: multi_json
124
+ requirement: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '1.7'
129
+ type: :runtime
130
+ prerelease: false
131
+ version_requirements: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '1.7'
122
136
  - !ruby/object:Gem::Dependency
123
137
  name: public_suffix
124
138
  requirement: !ruby/object:Gem::Requirement
@@ -313,8 +327,6 @@ files:
313
327
  - lib/test_track_rails_client/version.rb
314
328
  - vendor/bin/testtrack-cli/testtrack.darwin
315
329
  - vendor/bin/testtrack-cli/testtrack.linux
316
- - vendor/bin/testtrack.darwin
317
- - vendor/bin/testtrack.linux
318
330
  - vendor/gems/fakeable_her/fakeable_her.gemspec
319
331
  - vendor/gems/fakeable_her/lib/fakeable_her.rb
320
332
  - vendor/gems/fakeable_her/lib/fakeable_her/model.rb
Binary file
Binary file