devise_security_extension 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
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
- end
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.0
1
+ 0.3.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{devise_security_extension}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marco Scholl"]
@@ -7,19 +7,19 @@ require 'devise'
7
7
 
8
8
  module Devise # :nodoc:
9
9
 
10
- # expire password after e.g 1.year
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
- # validate password for strongness
14
+ # Validate password for strongness
15
15
  mattr_accessor :password_regex
16
16
  @@password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
17
17
 
18
- # write history of last x passwords
18
+ # How often save old passwords in archive
19
19
  mattr_accessor :password_archiving_count
20
20
  @@password_archiving_count = 5
21
21
 
22
- # deny old password (true, false, integer)
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\n # ==> Security Extension\n # Configure security extension for devise\n\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.0
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: -461004346872330403
132
+ hash: 1961152107200675824
133
133
  segments:
134
134
  - 0
135
135
  version: "0"