gabba 0.0.2 → 0.0.3

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.
@@ -71,8 +71,9 @@ module Gabba
71
71
  end
72
72
 
73
73
  def event_data(category, action, label = nil, value = nil)
74
- data = "5(#{category}*action" + (label ? "*#{label})" : ")")
74
+ data = "5(#{category}*#{action}" + (label ? "*#{label})" : ")")
75
75
  data += "(#{value})" if value
76
+ data
76
77
  end
77
78
 
78
79
  # create magical cookie params used by GA for its own nefarious purposes
@@ -1,3 +1,3 @@
1
1
  module Gabba
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -44,7 +44,11 @@ describe Gabba::Gabba do
44
44
  end
45
45
 
46
46
  it "must be able to create event data" do
47
- @gabba.event_data("cat1", "act1", "lab1", "val1").wont_be_nil
47
+ @gabba.event_data("cat1", "act1", "lab1", "val1").must_equal("5(cat1*act1*lab1)(val1)")
48
+ end
49
+
50
+ it "must be able to create event data with only category and action" do
51
+ @gabba.event_data("cat1", "act1").must_equal("5(cat1*act1)")
48
52
  end
49
53
 
50
54
  it "must do event request to google" 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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ron Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-18 00:00:00 -08:00
18
+ date: 2011-01-02 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21