rodauth-rails 2.0.0 → 2.0.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: d494712a7d9e548251e812cfb962c74c170663905f4b07f239d7c32f01f2a4c3
4
- data.tar.gz: 064204c2a262f5cae1360d8509623595a333acb43cbf421f0bfa45bb6b7de36a
3
+ metadata.gz: f888ea5284cc8afd796f548deec8741f63a474169f419d3f0479cf08bec6fe3b
4
+ data.tar.gz: 242e828939f8f96f15661b7f74adae54707ad0025431e46743f8be02879b4ffa
5
5
  SHA512:
6
- metadata.gz: 5a8a072ee2d3f615f14df9484ff04a1d1f85ebbef0aa0273087fca7042d437ac04e8628392e56b81c4ab23940aa7a3b4ca324899d53079d51bd5dda296429285
7
- data.tar.gz: a79173adc2a6edd193e8cdb5b11124387f3cc0ab8c001032fe564ed0824ef0a007b5bcadeab98800c149ad303aa5f032359e0cca917c2491a34c8c10ebc0dc22
6
+ metadata.gz: d71684eb8b214f061fe589f70110a261bac980546c977834e37cceb53d56636714de08f123ac47d76feb7198814a7607174fafc8fb09be46a04cb9c2e4eb0c31
7
+ data.tar.gz: 129e9151b9002e5a58731b24f0d6dd28b20fcab313000d37efec19eb83c4d7d9e501c47dd224f46044318d9c610bab58041169f0adaf789467dc883afb71eb9a
@@ -12,7 +12,12 @@ module Rodauth
12
12
 
13
13
  # Create emails with ActionMailer which uses configured delivery method.
14
14
  def create_email_to(to, subject, body)
15
- Mailer.create_email(to: to, from: email_from, subject: "#{email_subject_prefix}#{subject}", body: body)
15
+ Rodauth::Rails::Mailer.create_email(
16
+ to: to,
17
+ from: email_from,
18
+ subject: "#{email_subject_prefix}#{subject}",
19
+ body: body
20
+ )
16
21
  end
17
22
 
18
23
  # Delivers the given email.
@@ -20,12 +25,9 @@ module Rodauth
20
25
  email.deliver_now
21
26
  end
22
27
 
23
- # ActionMailer subclass for correct email delivering.
24
- class Mailer < ActionMailer::Base
25
- def create_email(options)
26
- mail(options)
27
- end
28
- end
28
+ # for backwards compatibility
29
+ Mailer = Rodauth::Rails::Mailer
30
+ deprecate_constant :Mailer
29
31
  end
30
32
  end
31
33
  end
@@ -0,0 +1,9 @@
1
+ module Rodauth
2
+ module Rails
3
+ class Mailer < ActionMailer::Base
4
+ def create_email(options)
5
+ mail(options)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module Rodauth
2
2
  module Rails
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
data/lib/rodauth/rails.rb CHANGED
@@ -10,6 +10,7 @@ module Rodauth
10
10
  # This allows avoiding loading Rodauth at boot time.
11
11
  autoload :App, "rodauth/rails/app"
12
12
  autoload :Auth, "rodauth/rails/auth"
13
+ autoload :Mailer, "rodauth/rails/mailer"
13
14
 
14
15
  @app = nil
15
16
  @middleware = true
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: 2.0.0
4
+ version: 2.0.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: 2024-12-16 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -337,6 +337,7 @@ files:
337
337
  - lib/rodauth/rails/feature/instrumentation.rb
338
338
  - lib/rodauth/rails/feature/internal_request.rb
339
339
  - lib/rodauth/rails/feature/render.rb
340
+ - lib/rodauth/rails/mailer.rb
340
341
  - lib/rodauth/rails/middleware.rb
341
342
  - lib/rodauth/rails/railtie.rb
342
343
  - lib/rodauth/rails/tasks.rake