split-analytics 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/split/analytics/version.rb +1 -1
- data/spec/analytics_spec.rb +3 -3
- data/split-analytics.gemspec +1 -1
- metadata +8 -9
data/.gitignore
CHANGED
data/spec/analytics_spec.rb
CHANGED
@@ -4,7 +4,7 @@ describe Split::Analytics do
|
|
4
4
|
include Split::Helper
|
5
5
|
it "should generate valid analytics javascript" do
|
6
6
|
tracking_code = tracking_code(:account => 'UA-12345-6')
|
7
|
-
tracking_code.should eql(" <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-12345-6']);\n \n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n </script>\n")
|
7
|
+
tracking_code.should eql(" <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-12345-6']);\n \n _gaq.push(['_trackPageview']);\n _gaq.push(['_trackPageLoadTime']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n </script>\n")
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should add custom variables for every test the user is involved in" do
|
@@ -14,6 +14,6 @@ describe Split::Analytics do
|
|
14
14
|
session[:split].should eql({'link_colour' => first_alt,'link_text' => second_alt})
|
15
15
|
|
16
16
|
tracking_code = tracking_code(:account => 'UA-12345-6')
|
17
|
-
tracking_code.should eql(" <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-12345-6']);\n _gaq.push(['_setCustomVar', 1, 'link_colour', '#{first_alt}', 1]);\n_gaq.push(['_setCustomVar', 2, 'link_text', '#{second_alt}', 1]);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n </script>\n")
|
17
|
+
tracking_code.should eql(" <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-12345-6']);\n _gaq.push(['_setCustomVar', 1, 'link_colour', '#{first_alt}', 1]);\n_gaq.push(['_setCustomVar', 2, 'link_text', '#{second_alt}', 1]);\n _gaq.push(['_trackPageview']);\n _gaq.push(['_trackPageLoadTime']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n </script>\n")
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
data/split-analytics.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ['lib']
|
16
16
|
gem.version = Split::Analytics::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency(%q<split>, ["~> 0.
|
18
|
+
gem.add_dependency(%q<split>, ["~> 0.3"])
|
19
19
|
|
20
20
|
# Development Dependencies
|
21
21
|
gem.add_development_dependency(%q<rspec>, ["~> 2.6"])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: split-analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Nesbitt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-13 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,11 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 13
|
30
30
|
segments:
|
31
31
|
- 0
|
32
|
-
-
|
33
|
-
|
34
|
-
version: 0.2.2
|
32
|
+
- 3
|
33
|
+
version: "0.3"
|
35
34
|
type: :runtime
|
36
35
|
version_requirements: *id001
|
37
36
|
- !ruby/object:Gem::Dependency
|