rack-auth-cookie 0.7.0 → 0.7.1

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.
@@ -5,6 +5,9 @@ require 'rack/request'
5
5
  module Rack
6
6
  module Auth
7
7
  class Cookie
8
+ # The version of the rack-auth-cookie library.
9
+ VERSION = '0.7.1'
10
+
8
11
  # Creates a new Rack::Auth::Cookie object. The +cookie_name+ param gives the
9
12
  # name of the cookie used to authenticate the requestor. The default is
10
13
  # 'auth_token'.
@@ -60,12 +63,12 @@ module Rack
60
63
  auth_datetime = Time.at(hash_data['AUTH_DATETIME']).utc
61
64
  auth_expire_datetime = Time.at(hash_data['AUTH_EXPIRE_DATETIME']).utc
62
65
 
63
- if auth_expire_datetime < Time.now.utc
64
- auth_fail = "Timed out due to inactivity"
66
+ if auth_datetime + @@max_lifetime < Time.now.utc
67
+ auth_fail = "You have been signed out since you signed in more than #{@@max_lifetime/3600} hours ago"
65
68
  end
66
69
 
67
- if auth_datetime + @@max_lifetime < Time.now.utc
68
- auth_fail = "Maximum session length exceeded"
70
+ if auth_expire_datetime < Time.now.utc
71
+ auth_fail = "You have been signed out due to inactivity"
69
72
  end
70
73
  end
71
74
 
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'rack-auth-cookie'
5
- gem.version = '0.7.0'
5
+ gem.version = '0.7.1'
6
6
  gem.authors = ["Daniel Berger", "Charlie O'Keefe"]
7
7
  gem.email = 'cokeefe@globe.gov'
8
8
  gem.homepage = 'http://www.github.com/charlieok/rack-auth-cookie'
@@ -8,6 +8,10 @@ class TC_Rack_Auth_Cookie < Test::Unit::TestCase
8
8
  @rack = Rack::Auth::Cookie.new(@app)
9
9
  end
10
10
 
11
+ def test_version
12
+ assert_equal('0.7.1', Rack::Auth::Cookie::VERSION)
13
+ end
14
+
11
15
  def test_constructor_basic
12
16
  assert_nothing_raised{ Rack::Auth::Cookie.new(@app) }
13
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-auth-cookie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Berger
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-12-30 00:00:00 -07:00
13
+ date: 2010-01-25 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency