audited_logfile 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/audited_logfile.rb +8 -4
- metadata +2 -2
data/lib/audited_logfile.rb
CHANGED
@@ -111,11 +111,15 @@ module ActiveRecord
|
|
111
111
|
end
|
112
112
|
|
113
113
|
Warden::Manager.after_authentication do |user,auth,opts|
|
114
|
-
|
115
|
-
|
114
|
+
if user.present?
|
115
|
+
user_info = "#{user.class}(#{user.id}): #{user.email}"
|
116
|
+
AuditedLogfile.logger.info "#{Time.now.iso8601(1)}, SIGNIN, #{user_info}"
|
117
|
+
end
|
116
118
|
end
|
117
119
|
|
118
120
|
Warden::Manager.before_logout do |user,auth,scope|
|
119
|
-
|
120
|
-
|
121
|
+
if user.present?
|
122
|
+
user_info = "#{user.class}(#{user.id}): #{user.email}"
|
123
|
+
AuditedLogfile.logger.info "#{Time.now.iso8601(1)}, SIGNOUT, #{user_info}"
|
124
|
+
end
|
121
125
|
end
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: audited_logfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alexander Kiseliov
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|