event_tracker 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14869ca74719eb114deaf73ce4da6edd9685a7d8
4
- data.tar.gz: 81d3f06adccf5a96fa3860382169c2cbd92db7d6
3
+ metadata.gz: 14863904566c527f6e6cc99504e2a2f1b235b673
4
+ data.tar.gz: c3e26bd651a4822289cc90dc727ceefc1ef912de
5
5
  SHA512:
6
- metadata.gz: 5882e8505b278c934871e46e55516a36d3fc5b05bc45248b7462c6911f2f61b6c35d3644af7db114014f59563c013f31dc28ec52b7f3886e9fd3d86e0b60e784
7
- data.tar.gz: 9c496b64dc3aae6c73bdbd8e034f57ac1fdd5ba95a0161f3cd62ac042ef209e43ac02a73bf51ecc574cf9a4ee5c49d10810a4207d19c1d8bcaf8b76d243ed24f
6
+ metadata.gz: 3a52515dd8cae29e29f9d2939e685b453ca11c621bcdc789fc13fb5a6b7522e6a4011b899d9ee784f2c002a58c22273bd66792e4a8af7c942be52bbc2bb8fa2a
7
+ data.tar.gz: 6e2eee88502a5bd53650944eb2f7708ffbe4be16eeb947f90051cf3f5e560676f05c2cca55066b9d874d2ca92853ddaf989bc302e77acffbaee27055a4cfeb4f
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ cache: bundler
3
+ sudo: false
4
+ before_install: gem install bundler
5
+ script: bundle exec rake
6
+ gemfile:
7
+ - Gemfile
8
+ - gemfiles/Gemfile.rails-4.2.rb
9
+ rvm:
10
+ - 2.3.1
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.4.1
4
+ - Fix for Rails 5 API mode [\#18](https://github.com/doorkeeper/event_tracker/pull/18)
5
+
3
6
  ## v0.4.0
4
7
 
5
8
  - Prevent XSS when tracking user supplied properties
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/doorkeeper/event_tracker.svg?branch=master)](https://travis-ci.org/doorkeeper/event_tracker)
2
+
1
3
  # Event Tracker
2
4
 
3
5
  Easy tracking using mixpanel, kissmetrics, or Google Analytics (universal analytics).
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "rails", [">= 4.2.6", "< 5.0"]
@@ -108,7 +108,7 @@ module EventTracker
108
108
  ActiveSupport.on_load :action_controller do
109
109
  include ActionControllerExtension
110
110
  include HelperMethods
111
- helper HelperMethods
111
+ helper HelperMethods if respond_to?(:helper)
112
112
  end
113
113
  end
114
114
  end
@@ -1,3 +1,3 @@
1
1
  module EventTracker
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -226,23 +226,35 @@ feature 'basic integration' do
226
226
  it { should include %Q{mixpanel.alias("jsmith@example.com")} }
227
227
  end
228
228
 
229
- context "halting filter chain in a before_filter" do
230
- background { visit "/before_filter" }
231
- it_should_behave_like "init"
232
- end
233
-
234
229
  class BeforeFilterController < ApplicationController
235
230
  around_filter :append_event_tracking_tags
236
231
  before_filter :halt_the_chain_and_render
237
232
 
238
233
  def index
239
- render inline: "OK", layout: true
234
+ render inline: "ORIGINAL", layout: true
240
235
  end
241
236
 
242
237
  def halt_the_chain_and_render
243
- render inline: "OK", layout: true and return
238
+ render inline: "HALTED", layout: true
244
239
  end
245
240
 
246
241
  end
247
242
 
243
+ context "halting filter chain in a before_filter" do
244
+ background { visit "/before_filter" }
245
+ it_should_behave_like "init"
246
+ it { expect(page.body).to_not include("ORIGINAL") }
247
+ it { expect(page.body).to include("HALTED") }
248
+ end
249
+
250
+ if Rails.version >= "5"
251
+ class ApiController < ActionController::API
252
+ def index
253
+ head :ok
254
+ end
255
+ end
256
+
257
+ background { visit "/api" }
258
+ it { expect(page).to have_http_status(:ok) }
259
+ end
248
260
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul McMahon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-18 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -61,12 +61,14 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
+ - ".travis.yml"
64
65
  - CHANGELOG.md
65
66
  - Gemfile
66
67
  - LICENSE
67
68
  - README.md
68
69
  - Rakefile
69
70
  - event_tracker.gemspec
71
+ - gemfiles/Gemfile.rails-4.2.rb
70
72
  - lib/event_tracker.rb
71
73
  - lib/event_tracker/integration.rb
72
74
  - lib/event_tracker/integration/base.rb
@@ -97,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
99
  version: '0'
98
100
  requirements: []
99
101
  rubyforge_project:
100
- rubygems_version: 2.2.3
102
+ rubygems_version: 2.6.8
101
103
  signing_key:
102
104
  specification_version: 4
103
105
  summary: Track using javascript from your controllers, even when redirecting
@@ -106,4 +108,3 @@ test_files:
106
108
  - spec/app/views/layouts/application.html.erb
107
109
  - spec/event_tracker_spec.rb
108
110
  - spec/spec_helper.rb
109
- has_rdoc: