devise_security_extension 0.3.0 → 0.3.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.
data/README.rdoc
CHANGED
@@ -12,12 +12,17 @@ after bundle execute
|
|
12
12
|
== Configuration
|
13
13
|
|
14
14
|
Devise.setup do |config|
|
15
|
-
# Should the password expire
|
15
|
+
# Should the password expire (e.g 3.months)
|
16
16
|
# config.expire_password_after = 3.months
|
17
17
|
|
18
18
|
# Need 1 char of A-Z, a-z and 0-9
|
19
19
|
# config.password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
|
20
|
-
|
20
|
+
|
21
|
+
# How often save old passwords in archive
|
22
|
+
# config.password_archiving_count = 5
|
23
|
+
|
24
|
+
# Deny old password (true, false, count)
|
25
|
+
# config.deny_old_passwords = true
|
21
26
|
|
22
27
|
== Model modules
|
23
28
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
@@ -7,19 +7,19 @@ require 'devise'
|
|
7
7
|
|
8
8
|
module Devise # :nodoc:
|
9
9
|
|
10
|
-
#
|
10
|
+
# Should the password expire (e.g 3.months)
|
11
11
|
mattr_accessor :expire_password_after
|
12
12
|
@@expire_password_after = 3.months
|
13
13
|
|
14
|
-
#
|
14
|
+
# Validate password for strongness
|
15
15
|
mattr_accessor :password_regex
|
16
16
|
@@password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
|
17
17
|
|
18
|
-
#
|
18
|
+
# How often save old passwords in archive
|
19
19
|
mattr_accessor :password_archiving_count
|
20
20
|
@@password_archiving_count = 5
|
21
21
|
|
22
|
-
#
|
22
|
+
# Deny old password (true, false, count)
|
23
23
|
mattr_accessor :deny_old_passwords
|
24
24
|
@@deny_old_passwords = true
|
25
25
|
end
|
@@ -7,13 +7,15 @@ module DeviseSecurityExtension
|
|
7
7
|
desc "Install the devise security extension"
|
8
8
|
|
9
9
|
def add_configs
|
10
|
-
inject_into_file "config/initializers/devise.rb", "\n
|
10
|
+
inject_into_file "config/initializers/devise.rb", "\n # ==> Security Extension\n # Configure security extension for devise\n\n" +
|
11
11
|
" # Should the password expire (e.g 3.months)\n" +
|
12
|
-
" # config.expire_password_after = false\n" +
|
12
|
+
" # config.expire_password_after = false\n\n" +
|
13
13
|
" # Need 1 char of A-Z, a-z and 0-9\n" +
|
14
|
-
" # config.password_regex = /(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])/\n" +
|
14
|
+
" # config.password_regex = /(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])/\n\n" +
|
15
15
|
" # How often save old passwords in archive\n" +
|
16
|
-
" # config.password_archiving_count = 5\n" +
|
16
|
+
" # config.password_archiving_count = 5\n\n" +
|
17
|
+
" # Deny old password (true, false, count)\n" +
|
18
|
+
" # config.deny_old_passwords = true" +
|
17
19
|
"\n", :before => /end[ |\n|]+\Z/
|
18
20
|
end
|
19
21
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: devise_security_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marco Scholl
|
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
hash:
|
132
|
+
hash: 1961152107200675824
|
133
133
|
segments:
|
134
134
|
- 0
|
135
135
|
version: "0"
|