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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddd926ba90868f2c8e1fe49b48b3c83b1c3007f8
4
- data.tar.gz: 4eae2949ccaa36c0d99d3dc286f7eed1a397903d
3
+ metadata.gz: 65c3c747328be0efaa7ba65e5ac0d79d38ba0478
4
+ data.tar.gz: 116db5adee7088ea5534834fcb4c161ac1a01018
5
5
  SHA512:
6
- metadata.gz: c265d223838541b2af1d9cb92465be4970e112ea580af643cae1ba9a85e6d620f01ff2dd6cc3212b6fad0af73ba8f993ce46df2fcae30e2c5de45d5020de9f1f
7
- data.tar.gz: 05b9aa6c0636199180af6111c467fd108f5bbd2d76b94d1452967315313d7feeb6618998227d1d4f2488eb18dfeb53b5fd6aebc418497bc5013c1238ba30527b
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://addons.heroku.com/informant)
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
- unless Config.api_token.blank? || env['REQUEST_METHOD'] == 'GET'
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 = ENV['INFORMANT_API_KEY']
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@gmail.com or tweet @informantapp and we'll help you out!"
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 middleware' do |config|
4
- config.middleware.use InformantRails::Middleware
5
- end
3
+ initializer 'informant' do |config|
4
+ Config.api_token ||= ENV['INFORMANT_API_KEY']
6
5
 
7
- initializer 'informant ActionController binding' do
8
- ActiveSupport.on_load :action_controller do
9
- include InformantRails::RequestTracking
10
- end
6
+ if Config.enabled?
7
+ config.middleware.use InformantRails::Middleware
11
8
 
12
- InformantRails::Config.filter_parameters = Rails.configuration.filter_parameters
13
- end
9
+ InformantRails::Config.filter_parameters = Rails.configuration.filter_parameters
14
10
 
15
- initializer 'informant ActiveRecord binding' do
16
- ActiveSupport.on_load(:active_record) do
17
- include InformantRails::ValidationTracking
18
- end
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
- ActiveSupport.on_load(:mongoid) do
21
- include InformantRails::ValidationTracking
19
+ ActiveSupport.on_load(:mongoid) do
20
+ include InformantRails::ValidationTracking
21
+ end
22
22
  end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module InformantRails
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
3
3
  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.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
- - Paul Elliott
8
- - Cameron Daigle
7
+ - Informant, LLC
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-07-25 00:00:00.000000000 Z
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@gmail.com
30
+ - support@informantapp.com
32
31
  executables: []
33
32
  extensions: []
34
33
  extra_rdoc_files: []