devise_traceable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -1
- data/lib/devise_traceable/hooks/traceable.rb +3 -2
- data/lib/devise_traceable/rails.rb +1 -1
- data/lib/devise_traceable/version.rb +1 -1
- data/lib/devise_traceable.rb +1 -0
- metadata +2 -2
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@ require 'rake'
|
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
require 'rake/gempackagetask'
|
5
5
|
require 'rake/testtask'
|
6
|
+
require File.join(File.dirname(__FILE__), 'lib', 'devise_traceable', 'version')
|
6
7
|
|
7
8
|
Rake::TestTask.new(:test) do |t|
|
8
9
|
t.libs << 'lib'
|
@@ -27,7 +28,7 @@ spec = Gem::Specification.new do |s|
|
|
27
28
|
s.description = "Devise Traceable For Traceing Devise Models Logins and Logouts in separate model table"
|
28
29
|
s.files = FileList["[A-Z]*", "{lib}/**/*"]
|
29
30
|
s.require_paths = ["lib"]
|
30
|
-
s.version =
|
31
|
+
s.version = DeviseTraceable::VERSION.dup
|
31
32
|
s.email = "sbertel@mobithought.com"
|
32
33
|
s.homepage = "http://github.com/shenoudab/devise_traceable"
|
33
34
|
s.author = 'Shenouda Bertel'
|
@@ -4,14 +4,15 @@
|
|
4
4
|
# not trigger it.
|
5
5
|
|
6
6
|
Warden::Manager.after_set_user :except => :fetch do |record, warden, options|
|
7
|
-
puts record
|
7
|
+
puts "Shenouda AfterSETUser" + record
|
8
8
|
if record.respond_to?(:insert_login!) #&& warden.authenticated?(options[:scope])
|
9
|
+
puts "WardenRequest" + warden.request
|
9
10
|
record.insert_login!(warden.request)
|
10
11
|
end
|
11
12
|
end
|
12
13
|
|
13
14
|
Warden::Manager.before_logout do |record, warden, opts|
|
14
|
-
puts record
|
15
|
+
puts "Shenouda Before Logout" + record
|
15
16
|
if record.respond_to?(:update_logout!)
|
16
17
|
record.update_logout!(warden.request)
|
17
18
|
end
|
data/lib/devise_traceable.rb
CHANGED