snogmetrics 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/lib/snogmetrics.rb CHANGED
@@ -19,7 +19,7 @@ require 'snogmetrics/railtie' if defined? Rails::Railtie
19
19
  # The default implementation outputs the real API only when
20
20
  # `Rails.env.production?` is true, and otherwise uses console.log
21
21
  module Snogmetrics
22
- VERSION = '0.1.8'
22
+ VERSION = '0.1.9'
23
23
 
24
24
  # Returns an instance of KissmetricsApi, which is an interface to the
25
25
  # KISSmetrics API. It has the methods #record and #identify, which work just
@@ -103,7 +103,7 @@ private
103
103
 
104
104
  # Register which variant the user saw in an A/B test.
105
105
  def set(experiment, variant)
106
- queue << ['set', experiment, variant]
106
+ queue << ['set', { experiment => variant }]
107
107
  end
108
108
 
109
109
  # Equivalent to `js(:reset => true)`, i.e. returns the JavaScript code
@@ -106,7 +106,7 @@ describe Snogmetrics do
106
106
  describe '#set' do
107
107
  it 'will output code that pushes a set call with the provided experiment name and variant' do
108
108
  @context.km.set('My Awesome Experiment', 'variant_a')
109
- @context.km.js.should include('_kmq.push(["set","My Awesome Experiment","variant_a"])')
109
+ @context.km.js.should include('_kmq.push(["set",{"My Awesome Experiment":"variant_a"}])')
110
110
  end
111
111
  end
112
112
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: snogmetrics
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.8
5
+ version: 0.1.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Theo Hultberg
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-30 00:00:00 +02:00
13
+ date: 2011-08-30 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency