pg_rails 7.0.8.pre.alpha.19 → 7.0.8.pre.alpha.21
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/initializers/rollbar.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_layout/app/views/pg_layout/_rollbar.html.erb +2 -2
- 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: 242457a4da70f56123b7fd123f88c96a3b84aa25b958e2d49df70329b018a2f3
|
4
|
+
data.tar.gz: 4e8e95c37063829636412299ae87e7ee683e62977d0afa8dbec310b1492bd46f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ac18ede797969e3e60579bdb3b47494e7b34879a4446ce583fb282b8ea99644d5f6efc9617f853b46554aa83f853a0dd8b21e15edbed41f5fffacb927c66fe1
|
7
|
+
data.tar.gz: a425dda11bfe7c0ba6aa63ec71e81ad9bb42bad11991b3bba914e2dd5966f50bb613296c87eec92051a301330de07ec4a8d028796dac1077f958dc0fbb3c7ff7
|
@@ -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'
|
@@ -2,7 +2,7 @@ Rollbar.configure do |config|
|
|
2
2
|
# Without configuration, Rollbar is enabled in all environments.
|
3
3
|
# To disable in specific environments, set config.enabled=false.
|
4
4
|
|
5
|
-
config.access_token =
|
5
|
+
config.access_token = Rails.application.credentials.rollbar.access_token_server
|
6
6
|
|
7
7
|
# Here we'll disable in 'test':
|
8
8
|
if Rails.env.test?
|
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,7 +1,7 @@
|
|
1
|
-
<% if
|
1
|
+
<% if Rails.application.credentials.rollbar.present? %>
|
2
2
|
<script>
|
3
3
|
var _rollbarConfig = {
|
4
|
-
accessToken: '<%=
|
4
|
+
accessToken: '<%= Rails.application.credentials.rollbar.access_token_client %>',
|
5
5
|
captureUncaught: true,
|
6
6
|
captureUnhandledRejections: true,
|
7
7
|
payload: {
|
@@ -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.21
|
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
|