split-analytics 0.2.4 → 0.2.5

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.
@@ -1,5 +1,5 @@
1
1
  module Split
2
2
  module Analytics
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module Split
6
6
  # needs more options: http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html
7
7
  account = options.delete(:account)
8
8
 
9
- <<-EOF
9
+ code = <<-EOF
10
10
  <script type="text/javascript">
11
11
  var _gaq = _gaq || [];
12
12
  _gaq.push(['_setAccount', '#{account}']);
@@ -21,6 +21,8 @@ module Split
21
21
  })();
22
22
  </script>
23
23
  EOF
24
+ code = raw(code)if defined?(raw)
25
+ code
24
26
  end
25
27
 
26
28
  def custom_variables
@@ -38,4 +40,9 @@ module Split::Helper
38
40
  include Split::Analytics
39
41
  end
40
42
 
41
- # mix Spilt::Analytics into Split::Helpers
43
+ if defined?(Rails)
44
+ class ActionController::Base
45
+ ActionController::Base.send :include, Split::Analytics
46
+ ActionController::Base.helper Split::Analytics
47
+ end
48
+ end
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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Nesbitt