informant-rails 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/informant-rails/client.rb +1 -1
- data/lib/informant-rails/railtie.rb +17 -11
- data/lib/informant-rails/request_tracking.rb +11 -0
- data/lib/informant-rails/validation_tracking.rb +11 -0
- data/lib/informant-rails/version.rb +1 -1
- data/lib/informant-rails.rb +13 -11
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a65828c53957be32307a98b3b0d54e8faaa0c23
|
4
|
+
data.tar.gz: 014728da192e78d784c737dcd9b17bf067eecab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4df17ef313a87bc1a7f66bf25c2d5486fc94e4980eee851a2171ea3087c30731b4dac1b7b69a53a7c13c51b6c22b3a2363ccb8459d3a58e4150beb7d0d27d180
|
7
|
+
data.tar.gz: 70366afc5e6eb6c236afb3576f1f826dba2e5445727119bf40cd3b443b530b1d7f33220c6b0b3ab45a8ef6048dce8c68c76e6410e45fef43a209247fb3cca374
|
@@ -1,26 +1,32 @@
|
|
1
1
|
module InformantRails
|
2
2
|
class Railtie < ::Rails::Railtie
|
3
3
|
initializer 'informant middleware' do |config|
|
4
|
-
|
4
|
+
if InformantRails::Config.api_token
|
5
|
+
config.middleware.use 'InformantRails::Middleware'
|
6
|
+
end
|
5
7
|
end
|
6
8
|
|
7
9
|
initializer 'informant ActionController binding' do
|
8
|
-
|
9
|
-
|
10
|
-
InformantRails::
|
11
|
-
controller_name, action_name
|
12
|
-
)
|
10
|
+
if InformantRails::Config.api_token
|
11
|
+
ActiveSupport.on_load :action_controller do
|
12
|
+
include InformantRails::RequestTracking
|
13
13
|
end
|
14
|
-
end
|
15
14
|
|
16
|
-
|
15
|
+
InformantRails::Config.filter_parameters = Rails.configuration.filter_parameters
|
16
|
+
end
|
17
17
|
end
|
18
18
|
|
19
19
|
initializer 'informant ActiveRecord binding' do
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
if InformantRails::Config.api_token
|
21
|
+
|
22
|
+
ActiveSupport.on_load(:active_record) do
|
23
|
+
include InformantRails::ValidationTracking
|
23
24
|
end
|
25
|
+
|
26
|
+
ActiveSupport.on_load(:mongoid) do
|
27
|
+
include InformantRails::ValidationTracking
|
28
|
+
end
|
29
|
+
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
data/lib/informant-rails.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
-
require 'informant-rails/railtie'
|
2
|
-
|
3
1
|
if defined?(Rake)
|
4
2
|
require 'rake'
|
5
3
|
Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
|
6
4
|
end
|
7
5
|
|
8
6
|
module InformantRails
|
9
|
-
autoload :Config,
|
10
|
-
autoload :ConnectionTester,
|
11
|
-
autoload :Client,
|
12
|
-
autoload :FieldError,
|
13
|
-
autoload :Middleware,
|
14
|
-
autoload :Model,
|
15
|
-
autoload :Request,
|
16
|
-
autoload :ParameterFilter,
|
17
|
-
autoload :
|
7
|
+
autoload :Config, 'informant-rails/config'
|
8
|
+
autoload :ConnectionTester, 'informant-rails/connection_tester'
|
9
|
+
autoload :Client, 'informant-rails/client'
|
10
|
+
autoload :FieldError, 'informant-rails/field_error'
|
11
|
+
autoload :Middleware, 'informant-rails/middleware'
|
12
|
+
autoload :Model, 'informant-rails/model'
|
13
|
+
autoload :Request, 'informant-rails/request'
|
14
|
+
autoload :ParameterFilter, 'informant-rails/parameter_filter'
|
15
|
+
autoload :RequestTracking, 'informant-rails/request_tracking'
|
16
|
+
autoload :ValidationTracking, 'informant-rails/validation_tracking'
|
17
|
+
autoload :VERSION, 'informant-rails/version'
|
18
18
|
end
|
19
|
+
|
20
|
+
require 'informant-rails/railtie'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: informant-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Elliott
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -59,6 +59,8 @@ files:
|
|
59
59
|
- lib/informant-rails/parameter_filter.rb
|
60
60
|
- lib/informant-rails/railtie.rb
|
61
61
|
- lib/informant-rails/request.rb
|
62
|
+
- lib/informant-rails/request_tracking.rb
|
63
|
+
- lib/informant-rails/validation_tracking.rb
|
62
64
|
- lib/informant-rails/version.rb
|
63
65
|
- lib/tasks/test_connection.rake
|
64
66
|
homepage: https://www.informantapp.com
|