Skip to content
This repository
Browse code

Update TODO, CHANGELOG and README.

  • Loading branch information...
commit 0434d72009e2f5ac58b9d8f7ad29b53020b490f4 1 parent f9c5dd6
José Valim authored November 24, 2009
3  CHANGELOG.rdoc
Source Rendered
... ...
@@ -1,3 +1,6 @@
  1
+* enhancements
  2
+  * Devise::Trackable - track sign in count, timestamps and ips
  3
+
1 4
 == 0.6.1
2 5
 
3 6
 * enhancements
1  README.rdoc
Source Rendered
@@ -14,6 +14,7 @@ Right now it's composed of five mainly modules:
14 14
 * Recoverable: takes care of reseting the user password and send reset instructions.
15 15
 * Rememberable: manages generating and clearing token for remember the user from a saved cookie.
16 16
 * Timeoutable: expires sessions without activity in a certain period of time.
  17
+* Trackable: tracks sign in count, timestamps and ip.
17 18
 * Validatable: creates all needed validations for email and password. It's totally optional, so you're able to to customize validations by yourself.
18 19
 
19 20
 There's an example application using Devise at http://github.com/plataformatec/devise_example .
3  TODO
... ...
@@ -1,5 +1,2 @@
1 1
 * Create update_with_password
2 2
 * Make test run with different ORMs
3  
-* Use request_ip in session cookies
4  
-* Devise::BruteForceProtection
5  
-* Devise::Trackeable
2  lib/devise.rb
... ...
@@ -1,6 +1,6 @@
1 1
 module Devise
2 2
   ALL = [:authenticatable, :confirmable, :recoverable, :rememberable,
3  
-         :trackable, :timeoutable, :validatable].freeze
  3
+         :timeoutable, :trackable, :validatable].freeze
4 4
 
5 5
   # Maps controller names to devise modules
6 6
   CONTROLLERS = {
14  test/integration/trackable_test.rb
... ...
@@ -1,6 +1,6 @@
1 1
 require 'test/test_helper'
2 2
 
3  
-class TrackableTest < ActionController::IntegrationTest
  3
+class TrackableHooksTest < ActionController::IntegrationTest
4 4
 
5 5
   test "current and last sign in timestamps are updated on each sign in" do
6 6
     user = create_user
@@ -52,11 +52,13 @@ class TrackableTest < ActionController::IntegrationTest
52 52
   end
53 53
 
54 54
   test "does not update anything if user is signed out along the way" do
55  
-    user = create_user(:confirm => false)
56  
-    sign_in_as_user
  55
+    swap Devise, :confirm_within => 0 do
  56
+      user = create_user(:confirm => false)
  57
+      sign_in_as_user
57 58
 
58  
-    user.reload
59  
-    assert_nil user.current_sign_in_at
60  
-    assert_nil user.last_sign_in_at
  59
+      user.reload
  60
+      assert_nil user.current_sign_in_at
  61
+      assert_nil user.last_sign_in_at
  62
+    end
61 63
   end
62 64
 end

0 notes on commit 0434d72

Please sign in to comment.
Something went wrong with that request. Please try again.