gabba 0.4.1 → 0.4.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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gabba (0.4.1)
4
+ gabba (0.4.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/Readme.md CHANGED
@@ -33,7 +33,7 @@ gabba.page_view("something", "track/me")
33
33
  ### Setting custom vars
34
34
 
35
35
  ```ruby
36
- # Index: 1 through 5
36
+ # Index: 1 through 50
37
37
  index = 1
38
38
 
39
39
  # Scope: VISITOR, SESSION or PAGE
@@ -52,7 +52,7 @@ gabba.page_view(...)
52
52
  ### Removing custom vars
53
53
 
54
54
  ```ruby
55
- # Index: 1 through 5
55
+ # Index: 1 through 50
56
56
  index = 1
57
57
 
58
58
  # Delete var with this index
@@ -53,7 +53,7 @@ module Gabba
53
53
  # Public: Set a custom variable to be passed along and logged by Google Analytics
54
54
  # (http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html)
55
55
  #
56
- # index - Integer between 1 and 5 for this custom variable
56
+ # index - Integer between 1 and 50 for this custom variable (limit is 5 normally, but is 50 for GA Premium)
57
57
  # name - String with the name of the custom variable
58
58
  # value - String with the value for teh custom variable
59
59
  # scope - Integer with custom variable scope must be 1 (VISITOR), 2 (SESSION) or 3 (PAGE)
@@ -66,7 +66,7 @@ module Gabba
66
66
  #
67
67
  # Returns array with the custom variable data
68
68
  def set_custom_var(index, name, value, scope)
69
- raise "Index must be between 1 and 5" unless (1..5).include?(index)
69
+ raise "Index must be between 1 and 50" unless (1..50).include?(index)
70
70
  raise "Scope must be 1 (VISITOR), 2 (SESSION) or 3 (PAGE)" unless (1..3).include?(scope)
71
71
 
72
72
  @custom_vars[index] = [ name, value, scope ]
@@ -1,5 +1,5 @@
1
1
  module Gabba
2
2
  unless const_defined?('VERSION')
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
@@ -160,9 +160,9 @@ describe Gabba::Gabba do
160
160
  @gabba.custom_var_data.must_equal "8(2!A*4!D)9(2!Y*4!N)11(2!2*4!1)"
161
161
  end
162
162
 
163
- it "must raise an error if index is outside the 1-5 (incl) range" do
163
+ it "must raise an error if index is outside the 1-50 (incl) range" do
164
164
  lambda { @gabba.set_custom_var(0, 'A', 'B', 1) }.must_raise(RuntimeError)
165
- lambda { @gabba.set_custom_var(6, 'A', 'B', 1) }.must_raise(RuntimeError)
165
+ lambda { @gabba.set_custom_var(51, 'A', 'B', 1) }.must_raise(RuntimeError)
166
166
  end
167
167
 
168
168
  it "must raise an error if scope is outside the 1-3 (incl) range" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gabba
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ron Evans