informant-rails 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/lib/informant-rails/client.rb +1 -3
- data/lib/informant-rails/config.rb +5 -1
- data/lib/informant-rails/connection_tester.rb +1 -1
- data/lib/informant-rails/railtie.rb +15 -15
- data/lib/informant-rails/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c3c747328be0efaa7ba65e5ac0d79d38ba0478
|
4
|
+
data.tar.gz: 116db5adee7088ea5534834fcb4c161ac1a01018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47cc3b01489162d35be20cd58f3a4e2d75b2aaf1540f38b2b97740a086203e89a4854c7bdd5262031b3713d2018d4d574e7df93b765da1ac09c6d64ab5170fe9
|
7
|
+
data.tar.gz: 63b86c907ab30f57a6ed1a7bb6786a4f9211ad8b8e7013346dbe6d07486dfdbef23fa259c91f6907fa631fd7c20ac9db397fe835a0ff2bf30468168c6f5c18df
|
data/README.markdown
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
The informant-rails gem provides Rails and ActiveRecord hooks for The Informant.
|
6
6
|
|
7
|
-
[![Homepage](https://s3.amazonaws.com/assets.heroku.com/addons.heroku.com/icons/1347/original.png)](https://
|
7
|
+
[![Homepage](https://s3.amazonaws.com/assets.heroku.com/addons.heroku.com/icons/1347/original.png)](https://www.informantapp.com)
|
8
8
|
|
9
9
|
## Compatibility
|
10
10
|
|
@@ -2,9 +2,7 @@ module InformantRails
|
|
2
2
|
class Client
|
3
3
|
|
4
4
|
def self.record(env)
|
5
|
-
|
6
|
-
new_request.request_url = env['HTTP_REFERER']
|
7
|
-
end
|
5
|
+
new_request.request_url = env['HTTP_REFERER'] unless env['REQUEST_METHOD'] == 'GET'
|
8
6
|
end
|
9
7
|
|
10
8
|
def self.record_action(controller_name, action)
|
@@ -3,7 +3,7 @@ module InformantRails::Config
|
|
3
3
|
|
4
4
|
attr_accessor :api_token, :exclude_models, :filter_parameters, :value_tracking
|
5
5
|
|
6
|
-
self.api_token
|
6
|
+
self.api_token
|
7
7
|
self.exclude_models = []
|
8
8
|
self.filter_parameters = []
|
9
9
|
self.value_tracking = true
|
@@ -13,4 +13,8 @@ module InformantRails::Config
|
|
13
13
|
def self.client_identifier
|
14
14
|
@client_identifier ||= "informant-rails-#{InformantRails::VERSION}"
|
15
15
|
end
|
16
|
+
|
17
|
+
def self.enabled?
|
18
|
+
api_token.present?
|
19
|
+
end
|
16
20
|
end
|
@@ -48,7 +48,7 @@ module InformantRails
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def assistance_message
|
51
|
-
"If you need assistance or have any questions, send an email to informantapp
|
51
|
+
"If you need assistance or have any questions, send an email to support@informantapp.com or tweet @informantapp and we'll help you out!"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -1,24 +1,24 @@
|
|
1
1
|
module InformantRails
|
2
2
|
class Railtie < ::Rails::Railtie
|
3
|
-
initializer 'informant
|
4
|
-
|
5
|
-
end
|
3
|
+
initializer 'informant' do |config|
|
4
|
+
Config.api_token ||= ENV['INFORMANT_API_KEY']
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
include InformantRails::RequestTracking
|
10
|
-
end
|
6
|
+
if Config.enabled?
|
7
|
+
config.middleware.use InformantRails::Middleware
|
11
8
|
|
12
|
-
|
13
|
-
end
|
9
|
+
InformantRails::Config.filter_parameters = Rails.configuration.filter_parameters
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
ActiveSupport.on_load(:action_controller) do
|
12
|
+
include InformantRails::RequestTracking
|
13
|
+
end
|
14
|
+
|
15
|
+
ActiveSupport.on_load(:active_record) do
|
16
|
+
include InformantRails::ValidationTracking
|
17
|
+
end
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
ActiveSupport.on_load(:mongoid) do
|
20
|
+
include InformantRails::ValidationTracking
|
21
|
+
end
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: informant-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Cameron Daigle
|
7
|
+
- Informant, LLC
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2016-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
@@ -28,7 +27,7 @@ dependencies:
|
|
28
27
|
description: The Informant tracks what users do wrong in your forms so you can make
|
29
28
|
them better.
|
30
29
|
email:
|
31
|
-
- informantapp
|
30
|
+
- support@informantapp.com
|
32
31
|
executables: []
|
33
32
|
extensions: []
|
34
33
|
extra_rdoc_files: []
|