rodauth-rails 1.6.0 → 1.6.2
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29cbaceb49208cac659dd31cbfcb874bf0df2c3b6b0133680f75904ab07a578
|
4
|
+
data.tar.gz: 2c9c7ed9e5d91428f15058274c0896298402e93d22a94c90c7d127e33699a1a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 546070f740b95f26d8f29b632672339215383737e9b6497c64d613c3c07929052477022a4e70051254d267a037c7b794448674aa99927d26edb4322cf274f778
|
7
|
+
data.tar.gz: 638ecc60b072197c490180a8241ed5af02ed3d6114f3cf5aa2e621ced9296e175d6d5b579543e43d23283164d3193551eb68efd54b2ef3b68cb79f49462397d8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.6.2 (2022-09-19)
|
2
|
+
|
3
|
+
* Use matching precision for current timestamp default values in Active Record 7.0+ migrations on MySQL (@janko)
|
4
|
+
|
5
|
+
## 1.6.1 (2022-09-19)
|
6
|
+
|
7
|
+
* Fix argument error when calling `RodauthMailer` in default configuration (@janko)
|
8
|
+
|
1
9
|
## 1.6.0 (2022-09-14)
|
2
10
|
|
3
11
|
* Avoid creating IDENTITY columns for primary foreign keys on SQL Server with Active Record (@janko)
|
@@ -110,9 +110,19 @@ module Rodauth
|
|
110
110
|
|
111
111
|
def current_timestamp
|
112
112
|
if ActiveRecord.version >= Gem::Version.new("5.0")
|
113
|
-
%(-> { "
|
113
|
+
%(-> { "#{current_timestamp_literal}" })
|
114
114
|
else
|
115
|
-
%(OpenStruct.new(quoted_id: "
|
115
|
+
%(OpenStruct.new(quoted_id: "#{current_timestamp_literal}"))
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Active Record 7+ sets default precision to 6 for timestamp columns,
|
120
|
+
# so we need to ensure we match this when setting the default value.
|
121
|
+
def current_timestamp_literal
|
122
|
+
if ActiveRecord.version >= Gem::Version.new("7.0") && activerecord_adapter == "mysql2" && ActiveRecord::Base.connection.supports_datetime_with_precision?
|
123
|
+
"CURRENT_TIMESTAMP(6)"
|
124
|
+
else
|
125
|
+
"CURRENT_TIMESTAMP"
|
116
126
|
end
|
117
127
|
end
|
118
128
|
else # Sequel
|
@@ -60,22 +60,22 @@ class RodauthMain < Rodauth::Rails::Auth
|
|
60
60
|
# ==> Emails
|
61
61
|
# Use a custom mailer for delivering authentication emails.
|
62
62
|
create_reset_password_email do
|
63
|
-
RodauthMailer.reset_password(
|
63
|
+
RodauthMailer.reset_password(self.class.configuration_name, account_id, reset_password_key_value)
|
64
64
|
end
|
65
65
|
create_verify_account_email do
|
66
|
-
RodauthMailer.verify_account(
|
66
|
+
RodauthMailer.verify_account(self.class.configuration_name, account_id, verify_account_key_value)
|
67
67
|
end
|
68
68
|
create_verify_login_change_email do |_login|
|
69
|
-
RodauthMailer.verify_login_change(
|
69
|
+
RodauthMailer.verify_login_change(self.class.configuration_name, account_id, verify_login_change_key_value)
|
70
70
|
end
|
71
71
|
create_password_changed_email do
|
72
|
-
RodauthMailer.password_changed(
|
72
|
+
RodauthMailer.password_changed(self.class.configuration_name, account_id)
|
73
73
|
end
|
74
74
|
# create_email_auth_email do
|
75
|
-
# RodauthMailer.email_auth(
|
75
|
+
# RodauthMailer.email_auth(self.class.configuration_name, account_id, email_auth_key_value)
|
76
76
|
# end
|
77
77
|
# create_unlock_account_email do
|
78
|
-
# RodauthMailer.unlock_account(
|
78
|
+
# RodauthMailer.unlock_account(self.class.configuration_name, account_id, unlock_account_key_value)
|
79
79
|
# end
|
80
80
|
send_email do |email|
|
81
81
|
# queue email delivery on the mailer after the transaction commits
|
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: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|