rulesio 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -0
- data/lib/rulesio/version.rb +1 -1
- data/lib/rulesio.rb +3 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -58,6 +58,15 @@ To manually send an event when a user upgrades to a "premium" account:
|
|
58
58
|
:user_email => current_user.email,
|
59
59
|
:plan => 'premium' )
|
60
60
|
|
61
|
+
Filtering sensitive data
|
62
|
+
------------------------
|
63
|
+
|
64
|
+
This gem will not send any parameters mentioned in Rails.application.config.filter_parameters, nor will it send any parameters that match /password/. We recommend extending this line in application.rb
|
65
|
+
|
66
|
+
config.filter_parameters += [:password]
|
67
|
+
|
68
|
+
to exclude sensitive parameters from both your log files and what you send to rules.io.
|
69
|
+
|
61
70
|
Using girl_friday for asynchronous communication and persistence
|
62
71
|
-----------------
|
63
72
|
|
data/lib/rulesio/version.rb
CHANGED
data/lib/rulesio.rb
CHANGED
@@ -9,6 +9,7 @@ require 'uri'
|
|
9
9
|
require 'logger'
|
10
10
|
require 'active_support/core_ext/module/attribute_accessors'
|
11
11
|
require 'active_support/core_ext/hash/indifferent_access'
|
12
|
+
require 'action_dispatch/http/parameter_filter'
|
12
13
|
|
13
14
|
module RulesIO
|
14
15
|
mattr_accessor :filter_parameters, :buffer, :token, :webhook_url, :queue, :queue_options, :controller_data, :logger, :disable_sending_events
|
@@ -111,8 +112,9 @@ module RulesIO
|
|
111
112
|
event[:request_method] = env['rulesio.request_method']
|
112
113
|
event[:user_agent] = request.user_agent
|
113
114
|
event[:referer_url] = request.referer
|
114
|
-
event[:params] = params.except(*RulesIO.filter_parameters).reject{|k,v|k =~ /password/}
|
115
115
|
event[:session] = request.session
|
116
|
+
parameter_filter = ::ActionDispatch::Http::ParameterFilter.new(RulesIO.filter_parameters)
|
117
|
+
event[:params] = parameter_filter.filter(params)
|
116
118
|
end
|
117
119
|
|
118
120
|
event.reject! {|k, v| v.to_s.blank?}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rulesio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|