event_tracker 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/event_tracker.rb CHANGED
@@ -47,13 +47,13 @@ module EventTracker
47
47
  body_insert_at = body.index('</body')
48
48
  return unless body_insert_at
49
49
  a = []
50
- if distinct_id = respond_to?(:mixpanel_distinct_id) && mixpanel_distinct_id
50
+ if distinct_id = respond_to?(:mixpanel_distinct_id, true) && mixpanel_distinct_id
51
51
  a << mixpanel_tracker.identify(distinct_id)
52
52
  end
53
- if name_tag = respond_to?(:mixpanel_name_tag) && mixpanel_name_tag
53
+ if name_tag = respond_to?(:mixpanel_name_tag, true) && mixpanel_name_tag
54
54
  a << mixpanel_tracker.name_tag(name_tag)
55
55
  end
56
- if identity = respond_to?(:kissmetrics_identity) && kissmetrics_identity
56
+ if identity = respond_to?(:kissmetrics_identity, true) && kissmetrics_identity
57
57
  a << kissmetrics_tracker.identify(identity)
58
58
  end
59
59
  registered_properties = session.delete(:registered_properties)
@@ -1,3 +1,3 @@
1
1
  module EventTracker
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -139,4 +139,17 @@ feature 'basic integration' do
139
139
  background { visit "/name_tag" }
140
140
  it { should include(%q{mixpanel.name_tag("foo@example.org")}) }
141
141
  end
142
+
143
+ class PrivateController < ApplicationController
144
+ after_filter :append_event_tracking_tags
145
+ def index; render inline: "OK", layout: true; end
146
+ private
147
+ def mixpanel_distinct_id; "distinct_id"; end
148
+ def kissmetrics_identity; "name@email.com"; end
149
+ end
150
+
151
+ context "with private methods" do
152
+ background { visit "/private" }
153
+ it_should_behave_like "with distinct id"
154
+ end
142
155
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
12
+ date: 2013-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  segments:
80
80
  - 0
81
- hash: 2100786682895310824
81
+ hash: -1979064167657650071
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  segments:
89
89
  - 0
90
- hash: 2100786682895310824
90
+ hash: -1979064167657650071
91
91
  requirements: []
92
92
  rubyforge_project:
93
93
  rubygems_version: 1.8.24