airbrake_user_attributes 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,15 @@ module Airbrake
|
|
4
4
|
# Returns filtered attributes for current user
|
5
5
|
def self.filtered_attributes(controller)
|
6
6
|
return {} unless controller.respond_to?(:current_user, true)
|
7
|
-
|
7
|
+
begin
|
8
|
+
user = controller.send(:current_user)
|
9
|
+
rescue Authlogic::Session::Activation::NotActivatedError
|
10
|
+
# When running rake airbrake:test, use the first User.
|
11
|
+
# Return empty hash if there are no users.
|
12
|
+
user = User.first
|
13
|
+
end
|
14
|
+
return {} unless user
|
15
|
+
|
8
16
|
# Removes auth-related fields
|
9
17
|
attributes = user.attributes.reject do |k, v|
|
10
18
|
/password|token|login|sign_in|per_page|_at$/ =~ k
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake_user_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '0'
|
206
206
|
segments:
|
207
207
|
- 0
|
208
|
-
hash:
|
208
|
+
hash: -63685505612795067
|
209
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
210
|
none: false
|
211
211
|
requirements:
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
segments:
|
216
216
|
- 0
|
217
|
-
hash:
|
217
|
+
hash: -63685505612795067
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project:
|
220
220
|
rubygems_version: 1.8.24
|