pg_rails 7.6.27 → 7.6.28
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/assets/stylesheets/pg_engine.scss +5 -0
- data/pg_engine/app/controllers/pg_engine/health_controller.rb +42 -0
- data/pg_engine/lib/pg_engine/configuracion.rb +2 -1
- data/pg_layout/app/views/devise/sessions/new.html.erb +8 -2
- data/pg_layout/app/views/devise/shared/_links.html.erb +16 -10
- data/pg_rails/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 774db48c26f0aeb3fd091956f27d32ccde51494853c6ecd82c61ccdd90dfe5a1
|
4
|
+
data.tar.gz: 938d4df455ebfc0e61fe200fd08139914b9da512307d10d0f533741a2a2591d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c6353df109a853aee9f8230efabd2f51383eff814b8631bbb60b501576a0aab5d5d39cda27505506e26a8e44672b00ac1957f4131107eb77f400b06de9ab8e
|
7
|
+
data.tar.gz: c8cb6d6d87be289911ff9db57849153db8cb3438088ca8adc2408f38e6aca75d687a5b8334b593d90ba16fb8458fe5026d6a770734b11df03febf65ca2b33e3a
|
@@ -23,6 +23,11 @@ nav[aria-label=breadcrumb] a {
|
|
23
23
|
}
|
24
24
|
|
25
25
|
// FORMS
|
26
|
+
// Form floating
|
27
|
+
.form-floating > .form-control ~ label::after {
|
28
|
+
// Para que cuando es un invalid field no choque el background de la label
|
29
|
+
background-color: transparent!important;
|
30
|
+
}
|
26
31
|
|
27
32
|
// Radio buttons
|
28
33
|
.radio_buttons legend {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# :nocov:
|
1
2
|
module PgEngine
|
2
3
|
class HealthController < ApplicationController
|
3
4
|
rescue_from(Exception) do |error|
|
@@ -9,6 +10,9 @@ module PgEngine
|
|
9
10
|
check_redis
|
10
11
|
check_postgres
|
11
12
|
check_websocket
|
13
|
+
PgEngine.config.health_ssl_urls.each do |url|
|
14
|
+
check_ssl(url)
|
15
|
+
end
|
12
16
|
render_up
|
13
17
|
end
|
14
18
|
|
@@ -55,6 +59,43 @@ module PgEngine
|
|
55
59
|
end
|
56
60
|
# rubocop:enable Metrics/MethodLength
|
57
61
|
|
62
|
+
def check_ssl(url)
|
63
|
+
uri = URI.parse(url)
|
64
|
+
http_session = Net::HTTP.new(uri.host, uri.port)
|
65
|
+
|
66
|
+
# Use SSL/TLS
|
67
|
+
http_session.use_ssl = true
|
68
|
+
|
69
|
+
# Create a request
|
70
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
71
|
+
|
72
|
+
begin
|
73
|
+
# Start the HTTP session
|
74
|
+
http_session.start do |http|
|
75
|
+
http.request(request)
|
76
|
+
|
77
|
+
# Check the response code
|
78
|
+
|
79
|
+
# Get the SSL certificate
|
80
|
+
cert = http.peer_cert
|
81
|
+
|
82
|
+
raise PgEngine::Error, "#{url}: No SSL certificate found." unless cert
|
83
|
+
# puts "Certificate Subject: #{cert.subject}"
|
84
|
+
# puts "Certificate Issuer: #{cert.issuer}"
|
85
|
+
# puts "Certificate Valid From: #{cert.not_before}"
|
86
|
+
# puts "Certificate Valid Until: #{cert.not_after}"
|
87
|
+
|
88
|
+
if cert.not_after < 7.days.from_now
|
89
|
+
raise PgEngine::Error, "#{url}: The SSL certificate is expired (or about to expire)."
|
90
|
+
end
|
91
|
+
end
|
92
|
+
rescue OpenSSL::SSL::SSLError => e
|
93
|
+
raise PgEngine::Error, "#{url}: SSL Error: #{e.message}"
|
94
|
+
rescue StandardError => e
|
95
|
+
raise PgEngine::Error, "#{url}: An error occurred: #{e.message}"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
58
99
|
def render_up
|
59
100
|
render html: html_status(color: '#005500')
|
60
101
|
end
|
@@ -68,3 +109,4 @@ module PgEngine
|
|
68
109
|
end
|
69
110
|
end
|
70
111
|
end
|
112
|
+
# :nocov:
|
@@ -4,13 +4,14 @@
|
|
4
4
|
|
5
5
|
module PgEngine
|
6
6
|
class Configuracion
|
7
|
-
attr_accessor :users_controller, :global_domains, :navigators, :user_profiles
|
7
|
+
attr_accessor :users_controller, :global_domains, :navigators, :user_profiles, :health_ssl_urls
|
8
8
|
|
9
9
|
# attr_accessor :profile_groups
|
10
10
|
|
11
11
|
def initialize
|
12
12
|
@global_domains = ['app.localhost.com', 'test.host', 'localhost']
|
13
13
|
@navigators = [PgEngine::Navigator.new]
|
14
|
+
@health_ssl_urls = []
|
14
15
|
# @profile_groups = [:account]
|
15
16
|
@user_profiles = {
|
16
17
|
account__owner: 0
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<%= render FlashContainerComponent.new %>
|
8
8
|
|
9
|
-
<%= pg_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
9
|
+
<%= pg_form_for(resource, as: resource_name, url: session_path(resource_name), wrapper: :floating_labels_form) do |f| %>
|
10
10
|
<div class="form-inputs">
|
11
11
|
<%= f.input :email,
|
12
12
|
required: false,
|
@@ -16,7 +16,13 @@
|
|
16
16
|
required: false,
|
17
17
|
input_html: { autocomplete: "current-password" } %>
|
18
18
|
<%#= f.input :remember_me, as: :hidden if devise_mapping.rememberable? %>
|
19
|
-
|
19
|
+
<div class="mb-3">
|
20
|
+
<%= f.input_field :remember_me, as: :boolean, class: 'form-check-input' if devise_mapping.rememberable? %>
|
21
|
+
<label class="mx-1" for="user_remember_me">Recordarme</label>
|
22
|
+
<span data-controller="tooltip" data-bs-title="No volver a solicitar credenciales por un mes en este navegador">
|
23
|
+
<i class="bi bi-info-circle"></i>
|
24
|
+
</span>
|
25
|
+
</div>
|
20
26
|
</div>
|
21
27
|
|
22
28
|
<div class="form-actions">
|
@@ -1,22 +1,32 @@
|
|
1
|
-
<div class="devise-links">
|
1
|
+
<div class="devise-links d-flex flex-column justify-content-center gap-3">
|
2
2
|
<%- if controller_name != 'sessions' %>
|
3
|
-
|
3
|
+
<div>
|
4
|
+
<%= link_to t(".sign_in"), new_session_path(resource_name) %>
|
5
|
+
</div>
|
4
6
|
<% end %>
|
5
7
|
|
6
8
|
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
7
|
-
|
9
|
+
<div>
|
10
|
+
<%= link_to t(".sign_up"), new_registration_path(resource_name) %>
|
11
|
+
</div>
|
8
12
|
<% end %>
|
9
13
|
|
10
14
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
11
|
-
|
15
|
+
<div>
|
16
|
+
<%= link_to t(".forgot_your_password"), new_password_path(resource_name) %>
|
17
|
+
</div>
|
12
18
|
<% end %>
|
13
19
|
|
14
20
|
<%- if false # devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
15
|
-
|
21
|
+
<div>
|
22
|
+
<%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %>
|
23
|
+
</div>
|
16
24
|
<% end %>
|
17
25
|
|
18
26
|
<%- if false # devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
27
|
+
<div>
|
19
28
|
<%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %>
|
29
|
+
</div>
|
20
30
|
<% end %>
|
21
31
|
|
22
32
|
<%- if devise_mapping.omniauthable? %>
|
@@ -29,8 +39,4 @@
|
|
29
39
|
.devise-links {
|
30
40
|
margin-top: 3em;
|
31
41
|
}
|
32
|
-
|
33
|
-
display: block;
|
34
|
-
margin-top: 1em;
|
35
|
-
}
|
36
|
-
</style>
|
42
|
+
</style>
|
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.6.
|
4
|
+
version: 7.6.28
|
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: 2025-01-
|
11
|
+
date: 2025-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|