rodauth-rails 0.4.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/README.md +177 -77
- data/lib/generators/rodauth/install_generator.rb +28 -18
- data/lib/generators/rodauth/migration/account_expiration.erb +7 -0
- data/lib/generators/rodauth/migration/active_sessions.erb +7 -0
- data/lib/generators/rodauth/migration/audit_logging.erb +16 -0
- data/lib/generators/rodauth/migration/base.erb +19 -0
- data/lib/generators/rodauth/migration/disallow_password_reuse.erb +5 -0
- data/lib/generators/rodauth/migration/email_auth.erb +7 -0
- data/lib/generators/rodauth/migration/jwt_refresh.erb +7 -0
- data/lib/generators/rodauth/migration/lockout.erb +11 -0
- data/lib/generators/rodauth/migration/otp.erb +7 -0
- data/lib/generators/rodauth/migration/password_expiration.erb +5 -0
- data/lib/generators/rodauth/migration/recovery_codes.erb +6 -0
- data/lib/generators/rodauth/migration/remember.erb +6 -0
- data/lib/generators/rodauth/migration/reset_password.erb +7 -0
- data/lib/generators/rodauth/migration/single_session.erb +5 -0
- data/lib/generators/rodauth/migration/sms_codes.erb +8 -0
- data/lib/generators/rodauth/migration/verify_account.erb +7 -0
- data/lib/generators/rodauth/migration/verify_login_change.erb +7 -0
- data/lib/generators/rodauth/migration/webauthn.erb +12 -0
- data/lib/generators/rodauth/migration_generator.rb +32 -0
- data/lib/generators/rodauth/migration_helpers.rb +69 -0
- data/lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb +2 -1
- data/lib/generators/rodauth/templates/app/lib/rodauth_app.rb +18 -18
- data/lib/generators/rodauth/templates/config/initializers/sequel.rb +1 -5
- data/lib/generators/rodauth/templates/db/migrate/create_rodauth.rb +2 -176
- data/lib/rodauth/rails.rb +23 -4
- data/lib/rodauth/rails/app.rb +3 -1
- data/lib/rodauth/rails/app/flash.rb +1 -1
- data/lib/rodauth/rails/app/middleware.rb +26 -0
- data/lib/rodauth/rails/feature.rb +92 -25
- data/lib/rodauth/rails/railtie.rb +11 -0
- data/lib/rodauth/rails/tasks.rake +28 -0
- data/lib/rodauth/rails/version.rb +1 -1
- data/rodauth-rails.gemspec +3 -3
- metadata +29 -7
@@ -0,0 +1,28 @@
|
|
1
|
+
namespace :rodauth do
|
2
|
+
task routes: :environment do
|
3
|
+
app = Rodauth::Rails.app
|
4
|
+
|
5
|
+
puts "Routes handled by #{app}:"
|
6
|
+
|
7
|
+
app.opts[:rodauths].each_key do |rodauth_name|
|
8
|
+
rodauth = Rodauth::Rails.rodauth(rodauth_name)
|
9
|
+
|
10
|
+
routes = rodauth.class.routes.map do |handle_method|
|
11
|
+
path_method = "#{handle_method.to_s.sub(/\Ahandle_/, "")}_path"
|
12
|
+
|
13
|
+
[
|
14
|
+
rodauth.public_send(path_method),
|
15
|
+
"rodauth#{rodauth_name && "(:#{rodauth_name})"}.#{path_method}",
|
16
|
+
]
|
17
|
+
end
|
18
|
+
|
19
|
+
padding = routes.map { |path, _| path.length }.max
|
20
|
+
|
21
|
+
route_lines = routes.map do |path, code|
|
22
|
+
"#{path.ljust(padding)} #{code}"
|
23
|
+
end
|
24
|
+
|
25
|
+
puts "\n #{route_lines.join("\n ")}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/rodauth-rails.gemspec
CHANGED
@@ -11,14 +11,14 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.homepage = "https://github.com/janko/rodauth-rails"
|
12
12
|
spec.license = "MIT"
|
13
13
|
|
14
|
-
spec.required_ruby_version = ">= 2.
|
14
|
+
spec.required_ruby_version = ">= 2.3"
|
15
15
|
|
16
16
|
spec.files = Dir["README.md", "LICENSE.txt", "CHANGELOG.md", "lib/**/*", "*.gemspec"]
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
spec.add_dependency "railties", ">= 4.2", "< 7"
|
20
|
-
spec.add_dependency "rodauth", "~> 2.
|
21
|
-
spec.add_dependency "sequel-activerecord_connection", "~> 1.
|
20
|
+
spec.add_dependency "rodauth", "~> 2.6"
|
21
|
+
spec.add_dependency "sequel-activerecord_connection", "~> 1.1"
|
22
22
|
spec.add_dependency "tilt"
|
23
23
|
spec.add_dependency "bcrypt"
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -36,28 +36,28 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '2.
|
39
|
+
version: '2.6'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '2.
|
46
|
+
version: '2.6'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sequel-activerecord_connection
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
53
|
+
version: '1.1'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '1.
|
60
|
+
version: '1.1'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: tilt
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,6 +98,26 @@ files:
|
|
98
98
|
- README.md
|
99
99
|
- lib/generators/rodauth/install_generator.rb
|
100
100
|
- lib/generators/rodauth/mailer_generator.rb
|
101
|
+
- lib/generators/rodauth/migration/account_expiration.erb
|
102
|
+
- lib/generators/rodauth/migration/active_sessions.erb
|
103
|
+
- lib/generators/rodauth/migration/audit_logging.erb
|
104
|
+
- lib/generators/rodauth/migration/base.erb
|
105
|
+
- lib/generators/rodauth/migration/disallow_password_reuse.erb
|
106
|
+
- lib/generators/rodauth/migration/email_auth.erb
|
107
|
+
- lib/generators/rodauth/migration/jwt_refresh.erb
|
108
|
+
- lib/generators/rodauth/migration/lockout.erb
|
109
|
+
- lib/generators/rodauth/migration/otp.erb
|
110
|
+
- lib/generators/rodauth/migration/password_expiration.erb
|
111
|
+
- lib/generators/rodauth/migration/recovery_codes.erb
|
112
|
+
- lib/generators/rodauth/migration/remember.erb
|
113
|
+
- lib/generators/rodauth/migration/reset_password.erb
|
114
|
+
- lib/generators/rodauth/migration/single_session.erb
|
115
|
+
- lib/generators/rodauth/migration/sms_codes.erb
|
116
|
+
- lib/generators/rodauth/migration/verify_account.erb
|
117
|
+
- lib/generators/rodauth/migration/verify_login_change.erb
|
118
|
+
- lib/generators/rodauth/migration/webauthn.erb
|
119
|
+
- lib/generators/rodauth/migration_generator.rb
|
120
|
+
- lib/generators/rodauth/migration_helpers.rb
|
101
121
|
- lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb
|
102
122
|
- lib/generators/rodauth/templates/app/lib/rodauth_app.rb
|
103
123
|
- lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb
|
@@ -171,10 +191,12 @@ files:
|
|
171
191
|
- lib/rodauth/rails.rb
|
172
192
|
- lib/rodauth/rails/app.rb
|
173
193
|
- lib/rodauth/rails/app/flash.rb
|
194
|
+
- lib/rodauth/rails/app/middleware.rb
|
174
195
|
- lib/rodauth/rails/controller_methods.rb
|
175
196
|
- lib/rodauth/rails/feature.rb
|
176
197
|
- lib/rodauth/rails/middleware.rb
|
177
198
|
- lib/rodauth/rails/railtie.rb
|
199
|
+
- lib/rodauth/rails/tasks.rake
|
178
200
|
- lib/rodauth/rails/version.rb
|
179
201
|
- rodauth-rails.gemspec
|
180
202
|
homepage: https://github.com/janko/rodauth-rails
|
@@ -189,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
211
|
requirements:
|
190
212
|
- - ">="
|
191
213
|
- !ruby/object:Gem::Version
|
192
|
-
version: 2.
|
214
|
+
version: '2.3'
|
193
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
216
|
requirements:
|
195
217
|
- - ">="
|