authlogic 2.0.12 → 2.0.13
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of authlogic might be problematic. Click here for more details.
- data/CHANGELOG.rdoc +10 -6
- data/Manifest.txt +2 -0
- data/lib/authlogic/regex.rb +25 -0
- data/lib/authlogic/version.rb +1 -1
- data/rails/init.rb +1 -0
- metadata +3 -1
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
== 2.0.
|
1
|
+
== 2.0.13 released 2009-5-13
|
2
|
+
|
3
|
+
* Add authlogic/regex.rb to manifest
|
4
|
+
|
5
|
+
== 2.0.12 released 2009-5-13
|
2
6
|
|
3
7
|
* Added the ability to add a last_request_update_allowed? method in your controller to pragmatically tell Authlogic when and when not to update the last_request_at field in your database. This only takes effect if the method if present.
|
4
8
|
* Extracted Authlogic's regular expressions into it's own module to allow easy use of them outside of Authlogic. See Authlogic::Regex for more info.
|
@@ -7,7 +11,7 @@
|
|
7
11
|
* Update email regular expression to use A-Z0-9 instead of /w as to not allow for diacritical marks in an email address.
|
8
12
|
* Changed config() convenience method to rw_config() to be more descriptive and less vague.
|
9
13
|
|
10
|
-
== 2.0.11
|
14
|
+
== 2.0.11 released 2009-4-25
|
11
15
|
|
12
16
|
* Fix bug when password is turned off and the SingleAccessToken module calls the after_password_set callback.
|
13
17
|
* HTTP basic auth can now be toggled on or off. It also checks for the existence of a standard username and password before enabling itself.
|
@@ -17,14 +21,14 @@
|
|
17
21
|
* Refactor params_enabled? so that the single_access_allowed? method in controllers takes precedence.
|
18
22
|
* Added testing comments in the README and expanded on the documentation in Authlogic::TestCase
|
19
23
|
|
20
|
-
== 2.0.10
|
24
|
+
== 2.0.10 released 2009-4-21
|
21
25
|
|
22
26
|
* Mock request is now transparent to non existent methods. Since the methods calls really have no functional value when testing authlogic.
|
23
27
|
* Allow password confirmation to be disabled.
|
24
28
|
* Modified login format validation to allow for the + character since emails addresses allow that as a valid character.
|
25
29
|
* Added merge_* configuration methods for acts_as_authentic to make merging options into configuration options that default to hashes. Just a few convenience methods.
|
26
30
|
|
27
|
-
== 2.0.9
|
31
|
+
== 2.0.9 released 2009-4-9
|
28
32
|
|
29
33
|
* Fixed bug where hooks provided by the password module were called when the password module was not being used due to the fact that the password field did not exist.
|
30
34
|
* Fixed bug where the find_with_login method was not being aliased if you were using an alternate field besides login.
|
@@ -33,11 +37,11 @@
|
|
33
37
|
|
34
38
|
* Dont reset the @password_changed instance variable to false because its halts the callback chain, instead reset it to nil.
|
35
39
|
|
36
|
-
== 2.0.7
|
40
|
+
== 2.0.7 released 2009-4-9
|
37
41
|
|
38
42
|
* Rename TestCase::ControllerAdapter to TestCase::RailsRequestAdapter to help clarify it's usage and fix a constant typo.
|
39
43
|
|
40
|
-
== 2.0.6
|
44
|
+
== 2.0.6 released 2009-4-9
|
41
45
|
|
42
46
|
* Don't use second, use [1] instead so older rails versions don't complain.
|
43
47
|
* Update email regular expression to be less TLD specific: (?:[A-Z]{2,4}|museum|travel)
|
data/Manifest.txt
CHANGED
@@ -31,6 +31,7 @@ lib/authlogic/crypto_providers/sha1.rb
|
|
31
31
|
lib/authlogic/crypto_providers/sha512.rb
|
32
32
|
lib/authlogic/i18n.rb
|
33
33
|
lib/authlogic/random.rb
|
34
|
+
lib/authlogic/regex.rb
|
34
35
|
lib/authlogic/session/activation.rb
|
35
36
|
lib/authlogic/session/active_record_trickery.rb
|
36
37
|
lib/authlogic/session/base.rb
|
@@ -61,6 +62,7 @@ lib/authlogic/test_case/mock_logger.rb
|
|
61
62
|
lib/authlogic/test_case/mock_request.rb
|
62
63
|
lib/authlogic/test_case/rails_request_adapter.rb
|
63
64
|
lib/authlogic/version.rb
|
65
|
+
rails/init.rb
|
64
66
|
shoulda_macros/authlogic.rb
|
65
67
|
test/acts_as_authentic_test/base_test.rb
|
66
68
|
test/acts_as_authentic_test/email_test.rb
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Authlogic
|
2
|
+
# This is a module the contains regular expressions used throughout Authlogic. The point of extracting
|
3
|
+
# them out into their own module is to make them easily available to you for other uses. Ex:
|
4
|
+
#
|
5
|
+
# validates_format_of :my_email_field, :with => Authlogic::Regex.email
|
6
|
+
module Regex
|
7
|
+
# A general email regular expression. It allows top level domains (TLD) to be from 2 - 4 in length, any
|
8
|
+
# TLD longer than that must be manually specified. The decisions behind this regular expression were made
|
9
|
+
# by reading this website: http://www.regular-expressions.info/email.html, which is an excellent resource
|
10
|
+
# for regular expressions.
|
11
|
+
def self.email
|
12
|
+
return @email_regex if @email_regex
|
13
|
+
email_name_regex = '[A-Z0-9_\.%\+\-]+'
|
14
|
+
domain_head_regex = '(?:[A-Z0-9\-]+\.)+'
|
15
|
+
domain_tld_regex = '(?:[A-Z]{2,4}|museum|travel)'
|
16
|
+
@email_regex = /\A#{email_name_regex}@#{domain_head_regex}#{domain_tld_regex}\z/i
|
17
|
+
end
|
18
|
+
|
19
|
+
# A simple regular expression that only allows for letters, numbers, spaces, and .-_@. Just a standard login / username
|
20
|
+
# regular expression.
|
21
|
+
def self.login
|
22
|
+
/\A\w[\w\.+\-_@ ]+\z/
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/authlogic/version.rb
CHANGED
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "authlogic"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson of Binary Logic
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/authlogic/crypto_providers/sha512.rb
|
77
77
|
- lib/authlogic/i18n.rb
|
78
78
|
- lib/authlogic/random.rb
|
79
|
+
- lib/authlogic/regex.rb
|
79
80
|
- lib/authlogic/session/activation.rb
|
80
81
|
- lib/authlogic/session/active_record_trickery.rb
|
81
82
|
- lib/authlogic/session/base.rb
|
@@ -106,6 +107,7 @@ files:
|
|
106
107
|
- lib/authlogic/test_case/mock_request.rb
|
107
108
|
- lib/authlogic/test_case/rails_request_adapter.rb
|
108
109
|
- lib/authlogic/version.rb
|
110
|
+
- rails/init.rb
|
109
111
|
- shoulda_macros/authlogic.rb
|
110
112
|
- test/acts_as_authentic_test/base_test.rb
|
111
113
|
- test/acts_as_authentic_test/email_test.rb
|