pg_rails 7.0.8.pre.alpha.19 → 7.0.8.pre.alpha.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/controllers/users/registrations_controller.rb +8 -0
- data/pg_engine/config/initializers/action_mailer.rb +21 -0
- data/pg_engine/config/initializers/devise.rb +1 -1
- data/pg_engine/config/routes.rb +1 -1
- data/pg_engine/spec/controllers/{devise → users}/registrations_controller_spec.rb +1 -1
- data/pg_layout/app/views/layouts/pg_layout/layout.html.slim +1 -0
- data/pg_layout/app/views/pg_layout/_flash.html.slim +8 -8
- data/pg_layout/app/views/pg_layout/_flash_alert.html.slim +12 -0
- data/pg_rails/lib/pg_rails/dotenv_support.rb +1 -1
- data/pg_rails/lib/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 698a6639bf79f6c5eccde6ea5d5aacc18040b4eceb3cbeff00b9110929da210d
|
4
|
+
data.tar.gz: e4f98c5c84dd09a63c6b1e179ca3f3450f376eb62fd291eb4a363de821367fb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9493d7e1d3bc2b64e14bdf079a87433f416dc60983735f2456d4c1f7b58c38cb313fcf6372f96b2f57e838df544d9d7ed5cc6282bddcb8f2855029cac21403aa
|
7
|
+
data.tar.gz: 666f14a5b5aae6934ebea4afbf0de0e496c45d9c22042d2cdb7f813fff59bc74ab4efb84c0ed72c582883d39279e81d8f053119fc4664107bc9afe3ee9fa3c6f
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class MailDeliveryTemporalError < StandardError; end
|
2
|
+
|
3
|
+
ActionMailer::MailDeliveryJob.rescue_from EOFError,
|
4
|
+
IOError,
|
5
|
+
# TimeoutError,
|
6
|
+
Errno::ENETUNREACH,
|
7
|
+
Errno::EHOSTUNREACH,
|
8
|
+
Errno::ECONNRESET,
|
9
|
+
Errno::ECONNABORTED,
|
10
|
+
Errno::ECONNREFUSED,
|
11
|
+
Errno::EPIPE,
|
12
|
+
Errno::ETIMEDOUT,
|
13
|
+
Net::SMTPAuthenticationError,
|
14
|
+
Net::SMTPServerBusy,
|
15
|
+
Net::SMTPSyntaxError,
|
16
|
+
Net::SMTPUnknownError,
|
17
|
+
Net::OpenTimeout,
|
18
|
+
Net::ReadTimeout,
|
19
|
+
OpenSSL::SSL::SSLError do |e|
|
20
|
+
raise MailDeliveryTemporalError, e
|
21
|
+
end
|
@@ -24,7 +24,7 @@ Devise.setup do |config|
|
|
24
24
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
25
25
|
# note that it will be overwritten if you use your own mailer class
|
26
26
|
# with default "from" parameter.
|
27
|
-
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
27
|
+
config.mailer_sender = ENV.fetch('DEFAULT_MAIL_FROM', 'please-change-me-at-config-initializers-devise@example.com')
|
28
28
|
|
29
29
|
# Configure the class responsible to send e-mails.
|
30
30
|
# config.mailer = 'Devise::Mailer'
|
data/pg_engine/config/routes.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
/ slim-lint:disable LineLength
|
3
3
|
- flash_to_show = flash.select { |flash_message| flash_message[0].to_sym.in? ApplicationController._flash_types }
|
4
4
|
/ slim-lint:enable LineLength
|
5
|
-
|
6
|
-
|
7
|
-
-
|
8
|
-
.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
- toast = flash[:toast].nil? ? true : flash[:toast]
|
6
|
+
- if toast
|
7
|
+
/ TODO: data-turbo-temporary, setear al activar toast?
|
8
|
+
- flash_to_show.each do |flash_type, message|
|
9
|
+
.toast(class="bg-#{flash_type_to_class(flash_type)}-subtle" role="alert" data-bs-autohide="true"
|
10
|
+
data-xturbo-temporary="true" aria-live="assertive" aria-atomic="true")
|
11
|
+
.toast-body
|
12
|
+
= message
|
13
13
|
/ TODO: centrar texto
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/ Flash messages que se muestran en el HTML
|
2
|
+
/ slim-lint:disable LineLength
|
3
|
+
- flash_to_show = flash.select { |flash_message| flash_message[0].to_sym.in? ApplicationController._flash_types }
|
4
|
+
/ slim-lint:enable LineLength
|
5
|
+
- toast = flash[:toast].nil? ? true : flash[:toast]
|
6
|
+
- unless toast
|
7
|
+
/ TODO: data-turbo-temporary, setear al activar toast?
|
8
|
+
.text-center
|
9
|
+
- flash_to_show.each do |flash_type, message|
|
10
|
+
div(class="alert alert-#{flash_type_to_class(flash_type)}" role="alert"
|
11
|
+
data-xturbo-temporary="true" aria-live="assertive" aria-atomic="true")
|
12
|
+
= message
|
@@ -1 +1 @@
|
|
1
|
-
Dotenv.load(
|
1
|
+
Dotenv.load(".env.#{Rails.env}.local", ".env.#{Rails.env}", '.env')
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails goodies.
|
14
14
|
email:
|
@@ -46,6 +46,7 @@ files:
|
|
46
46
|
- pg_engine/app/controllers/pg_engine/base_controller.rb
|
47
47
|
- pg_engine/app/controllers/pg_engine/devise_controller.rb
|
48
48
|
- pg_engine/app/controllers/pg_engine/require_sign_in.rb
|
49
|
+
- pg_engine/app/controllers/users/registrations_controller.rb
|
49
50
|
- pg_engine/app/decorators/account_decorator.rb
|
50
51
|
- pg_engine/app/decorators/pg_engine/base_decorator.rb
|
51
52
|
- pg_engine/app/decorators/user_account_decorator.rb
|
@@ -88,6 +89,7 @@ files:
|
|
88
89
|
- pg_engine/app/views/pg_engine/base/edit.html.slim
|
89
90
|
- pg_engine/app/views/pg_engine/base/index.html.slim
|
90
91
|
- pg_engine/app/views/pg_engine/base/new.html.slim
|
92
|
+
- pg_engine/config/initializers/action_mailer.rb
|
91
93
|
- pg_engine/config/initializers/active_admin.rb
|
92
94
|
- pg_engine/config/initializers/anycable.rb
|
93
95
|
- pg_engine/config/initializers/cable_ready.rb
|
@@ -122,8 +124,8 @@ files:
|
|
122
124
|
- pg_engine/spec/controllers/admin/user_accounts_controller_spec.rb
|
123
125
|
- pg_engine/spec/controllers/admin/users_controller_spec.rb
|
124
126
|
- pg_engine/spec/controllers/concerns/pg_engine/resource_helper_spec.rb
|
125
|
-
- pg_engine/spec/controllers/devise/registrations_controller_spec.rb
|
126
127
|
- pg_engine/spec/controllers/devise/sessions_controller_spec.rb
|
128
|
+
- pg_engine/spec/controllers/users/registrations_controller_spec.rb
|
127
129
|
- pg_engine/spec/factories/accounts.rb
|
128
130
|
- pg_engine/spec/factories/user_accounts.rb
|
129
131
|
- pg_engine/spec/factories/users.rb
|
@@ -177,6 +179,7 @@ files:
|
|
177
179
|
- pg_layout/app/views/layouts/pg_layout/devise.html.slim
|
178
180
|
- pg_layout/app/views/layouts/pg_layout/layout.html.slim
|
179
181
|
- pg_layout/app/views/pg_layout/_flash.html.slim
|
182
|
+
- pg_layout/app/views/pg_layout/_flash_alert.html.slim
|
180
183
|
- pg_layout/app/views/pg_layout/_navbar.html.erb
|
181
184
|
- pg_layout/app/views/pg_layout/_rollbar.html.erb
|
182
185
|
- pg_layout/app/views/pg_layout/_sidebar.html.erb
|