ab_panel 0.0.6 → 0.0.7

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.
@@ -94,6 +94,9 @@ module AbPanel
94
94
  self.after_filter(options.slice(:only, :except)) do |controller|
95
95
  properties = options.slice! :only, :except
96
96
 
97
+ funnel = properties.delete(:funnel)
98
+ AbPanel.funnels << funnel if funnel.present?
99
+
97
100
  options = {
98
101
  distinct_id: controller.ab_panel_id,
99
102
  ip: controller.request.remote_ip,
@@ -2,6 +2,9 @@ module AbPanel
2
2
  class Javascript
3
3
  def self.environment
4
4
  props = { distinct_id: AbPanel.env["ab_panel_id"] }
5
+
6
+ AbPanel.funnels.each { |f| props["funnel_#{f}"] = true }
7
+
5
8
  AbPanel.experiments.each { |exp| props[exp] = AbPanel.conditions.send(exp).condition }
6
9
  props.to_json
7
10
  end
@@ -1,3 +1,3 @@
1
1
  module AbPanel
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/ab_panel.rb CHANGED
@@ -40,6 +40,10 @@ module AbPanel
40
40
  env[key] = val
41
41
  end
42
42
 
43
+ def funnels
44
+ env['funnels'] ||= []
45
+ end
46
+
43
47
  def env
44
48
  @env ||= {
45
49
  'conditions' => conditions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ab_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -232,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  segments:
234
234
  - 0
235
- hash: -813494159408948522
235
+ hash: 2566484501435638754
236
236
  required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements:
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  segments:
243
243
  - 0
244
- hash: -813494159408948522
244
+ hash: 2566484501435638754
245
245
  requirements: []
246
246
  rubyforge_project:
247
247
  rubygems_version: 1.8.23