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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01d6c43a4f1804b0b45e92ebaeea5411deb1fa6dafd9a886d3ca6fe9f5151fb3
4
- data.tar.gz: 0b1eaf69bc0fd4d9164329b90c45ed1e206195a411b060cb0ab41ec28e3eae62
3
+ metadata.gz: 774db48c26f0aeb3fd091956f27d32ccde51494853c6ecd82c61ccdd90dfe5a1
4
+ data.tar.gz: 938d4df455ebfc0e61fe200fd08139914b9da512307d10d0f533741a2a2591d8
5
5
  SHA512:
6
- metadata.gz: d2521275d846111b2386211c36524c21b0d13de8db05cc0e28fd713021ece959a0f9deb7887d9d0ec8cf20229509dff6c1feed6d67cc14934beeb44fd38feed9
7
- data.tar.gz: 90fc3ad22510450edc3d19c0bc11f9dfba1de6471a42c2478541d4808abe69eb668f3506b44137dd815e4067d81f632ed91bdb457145eec6d11d508ae310239f
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
- <%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
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
- <%= link_to t(".sign_in"), new_session_path(resource_name) %>
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
- <%= link_to t(".sign_up"), new_registration_path(resource_name) %>
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
- <%= link_to t(".forgot_your_password"), new_password_path(resource_name) %>
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
- <%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %>
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
- .devise-links a {
33
- display: block;
34
- margin-top: 1em;
35
- }
36
- </style>
42
+ </style>
@@ -2,6 +2,6 @@
2
2
 
3
3
  # :nocov:
4
4
  module PgRails
5
- VERSION = '7.6.27'
5
+ VERSION = '7.6.28'
6
6
  end
7
7
  # :nocov:
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.27
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-10 00:00:00.000000000 Z
11
+ date: 2025-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails