satellite 0.2.1 → 0.2.2

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 CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -19,7 +19,7 @@ module Satellite
19
19
  #end
20
20
 
21
21
  # actually send request
22
- open(utm_url, { "User-Agent" => 'Satellite/0.1.1', "Accept-Language" => utm_params[:utmul] || 'de' })
22
+ open(utm_url, { "User-Agent" => 'Satellite/0.2.1', "Accept-Language" => utm_params[:utmul] || 'de' })
23
23
 
24
24
  # reset events / custom variables here
25
25
  utm_params.delete(:utme)
@@ -69,7 +69,8 @@ module Satellite
69
69
 
70
70
  # seems to be the current version
71
71
  # search for 'utmwv' in http://www.google-analytics.com/ga.js
72
- VERSION = "4.4sh" #"5.1.5"
72
+ #VERSION = '4.4sh'
73
+ VERSION = '5.1.5'
73
74
  UTM_GIF_LOCATION = ".google-analytics.com/__utm.gif"
74
75
 
75
76
  # adds default params
data/satellite.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{satellite}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Maik Vlcek}]
@@ -53,13 +53,18 @@ class TestSatellite < Test::Unit::TestCase
53
53
  #utmu
54
54
  should "properly track a page view" do
55
55
  tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
56
+ assert_equal tracker.track_page_view, true
57
+ end
56
58
 
59
+ should "properly track a custom variable" do
60
+ tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
61
+ tracker.set_custom_variable(1, 'test', 'unit-tester')
57
62
  assert_equal tracker.track_page_view, true
58
63
  end
59
64
 
60
65
  should "properly track a page view with given path" do
61
66
  tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
62
-
67
+
63
68
  path = "/test/path_test"
64
69
  tracker.track_page_view(path)
65
70
  tracker_path = tracker[:utmp].dup
@@ -67,6 +72,11 @@ class TestSatellite < Test::Unit::TestCase
67
72
  assert_equal tracker_path, path
68
73
  end
69
74
 
75
+ should "properly track an event" do
76
+ tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
77
+ assert_equal tracker.track_event("test", "unit-test", Time.now.to_s), true
78
+ end
79
+
70
80
  context 'utme' do
71
81
 
72
82
  should "properly parse given utme string" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satellite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Maik Vlcek