rodauth-rails 0.18.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +52 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +372 -653
  5. data/lib/generators/rodauth/install_generator.rb +32 -35
  6. data/lib/generators/rodauth/migration/active_sessions.erb +2 -2
  7. data/lib/generators/rodauth/migration/audit_logging.erb +1 -1
  8. data/lib/generators/rodauth/migration/base.erb +2 -2
  9. data/lib/generators/rodauth/migration/email_auth.erb +1 -1
  10. data/lib/generators/rodauth/migration/otp.erb +1 -1
  11. data/lib/generators/rodauth/migration/password_expiration.erb +1 -1
  12. data/lib/generators/rodauth/migration/reset_password.erb +1 -1
  13. data/lib/generators/rodauth/migration/sms_codes.erb +1 -1
  14. data/lib/generators/rodauth/migration/verify_account.erb +2 -2
  15. data/lib/generators/rodauth/migration/webauthn.erb +1 -1
  16. data/lib/generators/rodauth/migration_generator.rb +9 -2
  17. data/lib/generators/rodauth/migration_helpers.rb +8 -0
  18. data/lib/generators/rodauth/templates/INSTRUCTIONS +40 -0
  19. data/lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb +36 -19
  20. data/lib/generators/rodauth/templates/app/misc/rodauth_app.rb +27 -0
  21. data/lib/generators/rodauth/templates/app/{lib/rodauth_app.rb → misc/rodauth_main.rb} +10 -56
  22. data/lib/generators/rodauth/templates/app/models/account.rb +1 -0
  23. data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +1 -1
  24. data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +1 -1
  25. data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +1 -1
  26. data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +1 -1
  27. data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +1 -1
  28. data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +1 -1
  29. data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +1 -1
  30. data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +1 -1
  31. data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +1 -1
  32. data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +1 -1
  33. data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +1 -1
  34. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +1 -1
  35. data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +1 -1
  36. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +1 -1
  37. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +1 -1
  38. data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +1 -1
  39. data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +1 -1
  40. data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +1 -1
  41. data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +1 -1
  42. data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +1 -1
  43. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +1 -1
  44. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +1 -1
  45. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +1 -1
  46. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +1 -1
  47. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +1 -1
  48. data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +1 -1
  49. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +1 -1
  50. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +1 -1
  51. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +1 -1
  52. data/lib/rodauth/rails/app.rb +18 -4
  53. data/lib/rodauth/rails/auth.rb +1 -16
  54. data/lib/rodauth/rails/controller_methods.rb +4 -29
  55. data/lib/rodauth/rails/feature/base.rb +21 -0
  56. data/lib/rodauth/rails/feature/instrumentation.rb +1 -1
  57. data/lib/rodauth/rails/feature/internal_request.rb +10 -4
  58. data/lib/rodauth/rails/feature/render.rb +8 -0
  59. data/lib/rodauth/rails/tasks.rake +2 -2
  60. data/lib/rodauth/rails/version.rb +1 -1
  61. data/lib/rodauth/rails.rb +9 -20
  62. data/rodauth-rails.gemspec +1 -1
  63. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8eb9b3bee5cf4cd6741d7b05fa1d6869526a583ff3d9712b8a4adcb522c5a8d5
4
- data.tar.gz: 37cba7e8de2b0c2aa07763ca4da38989692e3cd467a314440f22706380e9e2fe
3
+ metadata.gz: 43bfba245fc25ff73659728066a02b0227b0041823547767a10fb7025f354329
4
+ data.tar.gz: 8e66a69d20e07b882e633330d27f7fafde524ba8e7af0052c83025bf101c3c10
5
5
  SHA512:
6
- metadata.gz: 8c027c266b03b2be2a68d19e847e31ce04d608e1befbf9785b38ffd94326962db2b01bf72b715311f9a690022fe62232c92a355094d451383330413096c57be5
7
- data.tar.gz: bc2d33f6d773cc7884c5b655ef93630a6e1f1ec56fe9ce6f75aa8127120005496eecc976aa8f1689cc4ade3e784070b5ce5de1308eda674e8487e9eac5a5599e
6
+ metadata.gz: e94b952207b08ba887d4168e442c669d15d04af11a0dada8f56d38f572ca1c662b0160067c2680cc984a203afe7cb443c1e3d9893544e9920655f4159c463d7f
7
+ data.tar.gz: 56562e10ef5f361511fe090265b6647056f9befa8ba3d2095c90a5e07f18e4e61ba202a6dad28289ccaded5ba096a535ff38a98096e034d811f0749bcc1a1207
data/CHANGELOG.md CHANGED
@@ -1,3 +1,55 @@
1
+ ## 1.2.1 (2022-02-19)
2
+
3
+ * Change `accounts.status` column type from string to integer (@zhongsheng)
4
+
5
+ ## 1.2.0 (2022-02-11)
6
+
7
+ * Work around Active Record 4.2 not supporting procs for literal SQL column default (@janko)
8
+
9
+ * Avoid re-fetching the account in `#current_account` when it has already been fetched by Rodauth (@janko)
10
+
11
+ * Extract `#current_account` helper functionality into `#rails_account` Rodauth method (@janko)
12
+
13
+ * Use default account status values in generated configuration, with enum on `Account` model (@janko)
14
+
15
+ ## 1.1.0 (2022-01-16)
16
+
17
+ * Automatically route the path prefix in `r.rodauth` if one has been set (@janko)
18
+
19
+ ## 1.0.0 (2021-12-25)
20
+
21
+ * Set Rodauth's email subject in the generated mailer (@janko)
22
+
23
+ * Raise error when outside of a request and `config.action_mailer.default_url_options` is unset (@janko)
24
+
25
+ * Avoid method re-definition warnings with named auth classes caused by `post_configure` being called twice (@janko)
26
+
27
+ * Don't modify `config.action_mailer.default_url_options` when `:protocol` is missing (@janko)
28
+
29
+ * Move `Rodauth::Rails.url_options` into `Rodauth::Auth#rails_url_options` (@janko)
30
+
31
+ * Generate named auth classes in `rodauth:install` generator (@janko)
32
+
33
+ * Generate `rodauth_app.rb` in `app/misc` directory (@janko)
34
+
35
+ * Add `--name` option to `rodauth:migration` generator (@janko)
36
+
37
+ * Disable Turbo in all built-in and generated views (@janko)
38
+
39
+ * Modify generated mailer integration to generate URLs according to `default_url_options` (@janko)
40
+
41
+ * Skip Active Record files in `rodauth:install` if `ActiveRecord::Railtie` is not defined (@janko)
42
+
43
+ * Stop loading `pass` plugin in `Rodauth::Rails::App` (@janko)
44
+
45
+ * Remove deprecated `:query` and `:form` options in `Rodauth::Rails.rodauth` (@janko)
46
+
47
+ * Require internal_request feature to be enabled in `Rodauth::Rails.rodauth` (@janko)
48
+
49
+ ## 0.18.1 (2021-12-16)
50
+
51
+ * Loosen Rails gem dependency to allow Rails 7.x (Intrepidd)
52
+
1
53
  ## 0.18.0 (2021-11-05)
2
54
 
3
55
  * Disable Turbo on the generated login form (@janko)
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Janko Marohnić
3
+ Copyright (c) 2020-2022 Janko Marohnić
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal