satellite 0.2.2 → 0.3.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.
- data/VERSION +1 -1
- data/lib/satellite/adapters/google_analytics.rb +1 -1
- data/lib/satellite/controllers/google_analytics.rb +1 -1
- data/lib/satellite.rb +1 -1
- data/satellite.gemspec +1 -1
- data/test/test_satellite.rb +6 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
@@ -78,7 +78,7 @@ module Satellite
|
|
78
78
|
utme = params.delete(:utme)
|
79
79
|
{
|
80
80
|
:utmac => self.class.account_id,
|
81
|
-
:utmcc => '__utma
|
81
|
+
:utmcc => '__utma=999.999.999.999.999.1;', # stub for non-existent cookie,
|
82
82
|
:utmcs => 'UTF-8',
|
83
83
|
:utme => Utme.parse(utme),
|
84
84
|
:utmhid => rand(0x7fffffff).to_s,
|
data/lib/satellite.rb
CHANGED
data/satellite.gemspec
CHANGED
data/test/test_satellite.rb
CHANGED
@@ -21,12 +21,12 @@ class TestSatellite < Test::Unit::TestCase
|
|
21
21
|
}
|
22
22
|
|
23
23
|
should "create a proper google adapter" do
|
24
|
-
tracker = Satellite.
|
24
|
+
tracker = Satellite.create_tracker(:google_analytics)
|
25
25
|
assert_equal tracker.type, Satellite::Adapters::GoogleAnalytics
|
26
26
|
end
|
27
27
|
|
28
28
|
should "return any created tracker as tracker interface" do
|
29
|
-
tracker = Satellite.
|
29
|
+
tracker = Satellite.create_tracker(:google_analytics)
|
30
30
|
assert_equal tracker.class, Satellite::TrackerInterface
|
31
31
|
end
|
32
32
|
|
@@ -52,18 +52,18 @@ class TestSatellite < Test::Unit::TestCase
|
|
52
52
|
#utmcc
|
53
53
|
#utmu
|
54
54
|
should "properly track a page view" do
|
55
|
-
tracker = Satellite.
|
55
|
+
tracker = Satellite.create_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
56
56
|
assert_equal tracker.track_page_view, true
|
57
57
|
end
|
58
58
|
|
59
59
|
should "properly track a custom variable" do
|
60
|
-
tracker = Satellite.
|
60
|
+
tracker = Satellite.create_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
61
61
|
tracker.set_custom_variable(1, 'test', 'unit-tester')
|
62
62
|
assert_equal tracker.track_page_view, true
|
63
63
|
end
|
64
64
|
|
65
65
|
should "properly track a page view with given path" do
|
66
|
-
tracker = Satellite.
|
66
|
+
tracker = Satellite.create_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
67
67
|
|
68
68
|
path = "/test/path_test"
|
69
69
|
tracker.track_page_view(path)
|
@@ -73,7 +73,7 @@ class TestSatellite < Test::Unit::TestCase
|
|
73
73
|
end
|
74
74
|
|
75
75
|
should "properly track an event" do
|
76
|
-
tracker = Satellite.
|
76
|
+
tracker = Satellite.create_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
77
77
|
assert_equal tracker.track_event("test", "unit-test", Time.now.to_s), true
|
78
78
|
end
|
79
79
|
|