devise_security_extension 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -23,7 +23,11 @@ after bundle execute
|
|
23
23
|
|
24
24
|
* :password_expirable - activate that passwords will expire
|
25
25
|
* :secure_validatable - better way to validate model. don't use with :validatable!!!
|
26
|
-
|
26
|
+
|
27
|
+
== Schema
|
28
|
+
|
29
|
+
* t.password_expirable
|
30
|
+
|
27
31
|
== Requirements
|
28
32
|
|
29
33
|
* devise (https://github.com/plataformatec/devise)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{devise_security_extension}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.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"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-03}
|
13
13
|
s.description = %q{a gem for extend devise for more password security}
|
14
14
|
s.email = %q{develop@marco-scholl.de}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/devise_security_extension/hooks/password_expirable.rb",
|
35
35
|
"lib/devise_security_extension/models/password_expirable.rb",
|
36
36
|
"lib/devise_security_extension/models/secure_validatable.rb",
|
37
|
+
"lib/devise_security_extension/orm/active_record.rb",
|
37
38
|
"lib/devise_security_extension/rails.rb",
|
38
39
|
"lib/devise_security_extension/routes.rb",
|
39
40
|
"lib/devise_security_extension/schema.rb",
|
@@ -44,7 +45,7 @@ Gem::Specification.new do |s|
|
|
44
45
|
s.homepage = %q{http://github.com/traxanos/devise_security_extension}
|
45
46
|
s.licenses = ["MIT"]
|
46
47
|
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version = %q{1.
|
48
|
+
s.rubygems_version = %q{1.5.0}
|
48
49
|
s.summary = %q{an security extension for devise}
|
49
50
|
s.test_files = [
|
50
51
|
"test/helper.rb",
|
@@ -52,7 +53,6 @@ Gem::Specification.new do |s|
|
|
52
53
|
]
|
53
54
|
|
54
55
|
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
56
|
s.specification_version = 3
|
57
57
|
|
58
58
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
@@ -1,10 +1,7 @@
|
|
1
|
-
require 'rails/all'
|
1
|
+
#require 'rails/all'
|
2
|
+
require 'active_record/connection_adapters/abstract/schema_definitions'
|
2
3
|
require 'active_support/core_ext/integer'
|
3
4
|
require 'devise'
|
4
|
-
require 'devise_security_extension/routes'
|
5
|
-
require 'devise_security_extension/schema'
|
6
|
-
require 'devise_security_extension/controllers/helpers'
|
7
|
-
require 'devise_security_extension/rails'
|
8
5
|
|
9
6
|
module Devise # :nodoc:
|
10
7
|
|
@@ -20,8 +17,16 @@ end
|
|
20
17
|
|
21
18
|
# an security extension for devise
|
22
19
|
module DeviseSecurityExtension
|
20
|
+
autoload :Schema, 'devise_security_extension/schema'
|
23
21
|
|
22
|
+
module Controllers # :nodoc:
|
23
|
+
autoload :Helpers, 'devise_security_extension/controllers/helpers'
|
24
|
+
end
|
24
25
|
end
|
25
26
|
|
26
27
|
Devise.add_module :password_expirable, :controller => :password_expirable, :model => 'devise_security_extension/models/password_expirable', :route => :password_expired
|
27
28
|
Devise.add_module :secure_validatable, :model => 'devise_security_extension/models/secure_validatable'
|
29
|
+
|
30
|
+
require 'devise_security_extension/routes'
|
31
|
+
require 'devise_security_extension/rails'
|
32
|
+
require 'devise_security_extension/orm/active_record'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module DeviseSecurityExtension
|
2
|
+
module Orm
|
3
|
+
# This module contains some helpers and handle schema (migrations):
|
4
|
+
#
|
5
|
+
# create_table :accounts do |t|
|
6
|
+
# t.password_expirable
|
7
|
+
# end
|
8
|
+
#
|
9
|
+
module ActiveRecord
|
10
|
+
module Schema
|
11
|
+
include DeviseSecurityExtension::Schema
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
ActiveRecord::ConnectionAdapters::Table.send :include, DeviseSecurityExtension::Orm::ActiveRecord::Schema
|
20
|
+
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, DeviseSecurityExtension::Orm::ActiveRecord::Schema
|
@@ -7,13 +7,13 @@ module DeviseSecurityExtension
|
|
7
7
|
#
|
8
8
|
# # For a new resource migration:
|
9
9
|
# create_table :the_resources do
|
10
|
-
#
|
10
|
+
# t.password_expirable
|
11
11
|
# ...
|
12
12
|
# end
|
13
13
|
#
|
14
14
|
# # or if the resource's table already exists, define a migration and put this in:
|
15
15
|
# change_table :the_resources do |t|
|
16
|
-
#
|
16
|
+
# t.datetime :password_changed_at
|
17
17
|
# end
|
18
18
|
#
|
19
19
|
def password_expirable
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_security_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
version: 0.2.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Marco Scholl
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-03 00:00:00 +01:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,8 +20,6 @@ dependencies:
|
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 0
|
29
23
|
version: "0"
|
30
24
|
type: :runtime
|
31
25
|
prerelease: false
|
@@ -37,8 +31,6 @@ dependencies:
|
|
37
31
|
requirements:
|
38
32
|
- - ">="
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 0
|
42
34
|
version: "0"
|
43
35
|
type: :runtime
|
44
36
|
prerelease: false
|
@@ -50,8 +42,6 @@ dependencies:
|
|
50
42
|
requirements:
|
51
43
|
- - ">="
|
52
44
|
- !ruby/object:Gem::Version
|
53
|
-
segments:
|
54
|
-
- 0
|
55
45
|
version: "0"
|
56
46
|
type: :runtime
|
57
47
|
prerelease: false
|
@@ -63,10 +53,6 @@ dependencies:
|
|
63
53
|
requirements:
|
64
54
|
- - ~>
|
65
55
|
- !ruby/object:Gem::Version
|
66
|
-
segments:
|
67
|
-
- 1
|
68
|
-
- 0
|
69
|
-
- 0
|
70
56
|
version: 1.0.0
|
71
57
|
type: :development
|
72
58
|
prerelease: false
|
@@ -78,10 +64,6 @@ dependencies:
|
|
78
64
|
requirements:
|
79
65
|
- - ~>
|
80
66
|
- !ruby/object:Gem::Version
|
81
|
-
segments:
|
82
|
-
- 1
|
83
|
-
- 5
|
84
|
-
- 2
|
85
67
|
version: 1.5.2
|
86
68
|
type: :development
|
87
69
|
prerelease: false
|
@@ -93,8 +75,6 @@ dependencies:
|
|
93
75
|
requirements:
|
94
76
|
- - ">="
|
95
77
|
- !ruby/object:Gem::Version
|
96
|
-
segments:
|
97
|
-
- 0
|
98
78
|
version: "0"
|
99
79
|
type: :development
|
100
80
|
prerelease: false
|
@@ -126,6 +106,7 @@ files:
|
|
126
106
|
- lib/devise_security_extension/hooks/password_expirable.rb
|
127
107
|
- lib/devise_security_extension/models/password_expirable.rb
|
128
108
|
- lib/devise_security_extension/models/secure_validatable.rb
|
109
|
+
- lib/devise_security_extension/orm/active_record.rb
|
129
110
|
- lib/devise_security_extension/rails.rb
|
130
111
|
- lib/devise_security_extension/routes.rb
|
131
112
|
- lib/devise_security_extension/schema.rb
|
@@ -146,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
127
|
requirements:
|
147
128
|
- - ">="
|
148
129
|
- !ruby/object:Gem::Version
|
149
|
-
hash: -
|
130
|
+
hash: -219664376672679260
|
150
131
|
segments:
|
151
132
|
- 0
|
152
133
|
version: "0"
|
@@ -155,13 +136,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
136
|
requirements:
|
156
137
|
- - ">="
|
157
138
|
- !ruby/object:Gem::Version
|
158
|
-
segments:
|
159
|
-
- 0
|
160
139
|
version: "0"
|
161
140
|
requirements: []
|
162
141
|
|
163
142
|
rubyforge_project:
|
164
|
-
rubygems_version: 1.
|
143
|
+
rubygems_version: 1.5.0
|
165
144
|
signing_key:
|
166
145
|
specification_version: 3
|
167
146
|
summary: an security extension for devise
|