test_track_rails_client 4.0.0.alpha4 → 4.0.0.alpha5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0941a2bb5bbdf239b9ca86d6cf4f5bb814fabf7e
|
4
|
+
data.tar.gz: f3e2a7ddd6b62235fc8403220e9b242f6e375f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3044f166258d845bb933fbf5ae0afaaf7cd8367961157ea9d7a5b22a5b50bc53b36233efc15ed93ec481e816ae4c690b040567a6bdf2134f92006c5cd325baf
|
7
|
+
data.tar.gz: 208541b783e7700e603cad6d0fb1dfbdcdfd4aa52d21b9b4bbe29142d6bbd44923246f24a8eca0bf5fd84ebc30fd56137a98426bbddab238705edfe945632b90
|
@@ -1,4 +1,10 @@
|
|
1
1
|
class TestTrack::OfflineSession
|
2
|
+
AnalyticsAssignment = Struct.new(:visitor_id, :split_name, :variant, :context, :unsynced) do
|
3
|
+
def unsynced?
|
4
|
+
unsynced
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
2
8
|
def initialize(remote_visitor)
|
3
9
|
@remote_visitor = remote_visitor
|
4
10
|
end
|
@@ -30,10 +36,22 @@ class TestTrack::OfflineSession
|
|
30
36
|
def visitor
|
31
37
|
@visitor ||= TestTrack::Visitor.new(
|
32
38
|
id: remote_visitor.id,
|
33
|
-
assignments:
|
39
|
+
assignments: analytics_assignments
|
34
40
|
)
|
35
41
|
end
|
36
42
|
|
43
|
+
def analytics_assignments
|
44
|
+
remote_visitor.assignments.map do |remote_assignment|
|
45
|
+
AnalyticsAssignment.new(
|
46
|
+
remote_visitor.id,
|
47
|
+
remote_assignment.split_name,
|
48
|
+
remote_assignment.variant,
|
49
|
+
remote_assignment.context,
|
50
|
+
remote_assignment.unsynced
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
37
55
|
def manage
|
38
56
|
yield TestTrack::VisitorDSL.new(visitor)
|
39
57
|
ensure
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class TestTrack::Remote::Assignment
|
2
2
|
include TestTrack::RemoteModel
|
3
3
|
|
4
|
-
attributes :visitor_id, :split_name, :variant, :unsynced
|
4
|
+
attributes :visitor_id, :split_name, :variant, :context, :unsynced
|
5
5
|
|
6
6
|
validates :visitor_id, :split_name, :variant, :mixpanel_result, presence: true
|
7
7
|
|
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.alpha5
|
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: 2018-
|
16
|
+
date: 2018-05-01 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: airbrake
|