simplest_auth 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,16 +52,16 @@ module SimplestAuth
52
52
  end
53
53
 
54
54
  def current_user=(user)
55
- session[:user_id] = user ? user.id : nil
55
+ session[session_key] = user ? user.id : nil
56
56
  @current_user = user || false
57
57
  end
58
58
 
59
59
  def current_user_id
60
- session[:user_id]
60
+ session[session_key]
61
61
  end
62
62
 
63
63
  def clear_session
64
- session[:user_id] = nil
64
+ session[session_key] = nil
65
65
  end
66
66
 
67
67
  def self.included(base)
@@ -3,7 +3,7 @@ module SimplestAuth
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
@@ -2,6 +2,9 @@ require File.dirname(__FILE__) + '/../../test_helper'
2
2
 
3
3
  class User
4
4
  class RecordNotFound < StandardError; end
5
+ def self.session_key
6
+ :user_id
7
+ end
5
8
  end
6
9
 
7
10
  class ControllerTest < Test::Unit::TestCase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplest_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Pitale
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-07 00:00:00 -04:00
12
+ date: 2009-07-08 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency