pg_rails 7.6.43 → 7.6.45

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: a32df0403ce2d6750bef9c081329cf0b64d50170aa9419784c69196781c43a03
4
- data.tar.gz: c14290d74b1c8e382dfeacdf0d6d507116d5abbd8f48196e77b2893199a212a8
3
+ metadata.gz: b524111b45e87b104a8c0f6b72556dd1517c4e647178461750e183419a23146c
4
+ data.tar.gz: 0c6dd6725ed14b94e5717cc6a2281aa00b763460570c637f6053f470f5a8eb18
5
5
  SHA512:
6
- metadata.gz: bd4228c52176a156318f9f25fffdbdfa3095192d7a18e85b9adb4c70f5b14ef71317e7a6fdfb3ac014cbd614f1a08c3c3486f1a75825d5f8c7584503e638aef7
7
- data.tar.gz: d47e45800ff171164c443b924f6f7b7d40347ef57aaf7c15419aa378f1c3ddf1dc00642cfffe3661e0cd3ac2f299903124a092e5603450e645c940642556981f
6
+ metadata.gz: 46084cbce13b300ab53a7e9f742ac80a802a7410dd4759c3a2600fbc714747da28ce95d3659167e18ee2c76313fa300e5f4ee29f23f39f8d39caa376a05bd4dd
7
+ data.tar.gz: 72e0c9c7a81a1ce708a46987f8dfc0a042056bc22e61ee800781f65151caaa80c565ef65f1b209154d95eb35ec2454b3bc62a446b9b9c6c9f33bfba974df17d4
@@ -16,6 +16,9 @@ class PgAssociableInput < SimpleForm::Inputs::StringInput
16
16
 
17
17
  def input(wrapper_options = nil)
18
18
  atributo = attribute_name.to_s.gsub('_id', '')
19
+ # TODO: rescue route error and show custom error:
20
+ # la ruta por defecto no existe, quizás está en otro namespace?
21
+ # pasar las opciones modal_url: y buscar_url:
19
22
  url_modal = options[:modal_url] || namespaced_path(clase_asociacion(atributo), prefix: :abrir_modal)
20
23
  url_search = options[:buscar_url] || namespaced_path(clase_asociacion(atributo), prefix: :buscar)
21
24
 
@@ -9,7 +9,9 @@ export default class extends Controller {
9
9
  history = []
10
10
 
11
11
  connect (e) {
12
- this.modalPuntero = new bootstrap.Modal(this.element)
12
+ this.modalPuntero = new bootstrap.Modal(this.element, {
13
+ keyboard: false
14
+ })
13
15
  if (this.element.dataset.removeOnHide === 'true') {
14
16
  this.element.addEventListener('hidden.bs.modal', (e) => {
15
17
  this.element.remove()
@@ -18,10 +20,25 @@ export default class extends Controller {
18
20
  if (this.element.dataset.autoShow === 'true') {
19
21
  this.modalPuntero.show()
20
22
  }
23
+ document.addEventListener('keydown', (event) => {
24
+ if (event.key === 'Escape') {
25
+ // Sin este timeout crashea boostrap: Uncaught TypeError: can't access
26
+ // property "classList", this._element is null
27
+ setTimeout(() => {
28
+ this.back()
29
+ }, 100)
30
+ }
31
+ })
21
32
 
22
33
  this.element.addEventListener('turbo:frame-render', (ev) => {
23
34
  if (ev.detail.fetchResponse.response.ok && ev.target.id === 'modal_content') {
24
- this.history.push(ev.target.src)
35
+ const repeatedLink =
36
+ this.history.length > 0 &&
37
+ this.history[this.history.length - 1] === ev.target.src
38
+
39
+ if (!repeatedLink) {
40
+ this.history.push(ev.target.src)
41
+ }
25
42
  }
26
43
  })
27
44
 
@@ -114,9 +131,11 @@ export default class extends Controller {
114
131
  frame.src = url
115
132
  frame.innerHTML = '<div style="min-height: 30em">Cargando...</div>'
116
133
  } else {
117
- this.modalPuntero.hide()
134
+ this.remove()
135
+ }
136
+ if (ev) {
137
+ ev.stopPropagation()
118
138
  }
119
- ev.stopPropagation()
120
139
  this.reloadTop()
121
140
  }
122
141
 
@@ -74,10 +74,10 @@ module PgEngine
74
74
  end
75
75
 
76
76
  def check_site_ssl(sites, url)
77
- raise PgEngine::Error, "SSL record not present: #{url}" if sites[url].blank?
77
+ raise PgEngine::Error, "SSL record not present: #{url}. Forgot to run PgEngine::SslVerifier ?" if sites[url].blank?
78
78
 
79
79
  if Time.zone.parse(sites[url]['verified_at']) < 2.days.ago
80
- raise PgEngine::Error, "The SSL info is outdated: #{url}"
80
+ raise PgEngine::Error, "The SSL info is outdated: #{url}. PgEngine::SslVerifier is down?"
81
81
  end
82
82
 
83
83
  return unless Time.zone.parse(sites[url]['expires_at']) < 7.days.from_now
@@ -33,6 +33,8 @@
33
33
  / if turbo stream? && Current.account.present?
34
34
  / = turbo_stream_from Current.account, @clase_modelo.model_name.plural
35
35
 
36
+ = yield(:index_header)
37
+
36
38
  - if action_name == 'archived'
37
39
  .text-center.p-3.text-warning-emphasis.border-bottom
38
40
  div
@@ -118,6 +118,7 @@ es:
118
118
  header: "Aceptar invitación"
119
119
  submit_button: "Aceptar"
120
120
  confirmations:
121
+ # FIXME: cambiar a: "ahora tu email está confirmado", acá y en otros lugares
121
122
  confirmed: ¡Bien! Ahora tu cuenta está confirmada
122
123
  sessions:
123
124
  signed_in: ''
@@ -4,6 +4,10 @@ Rails.application.routes.draw do
4
4
  get "pg_engine/health" => "pg_engine/health#show", as: :pg_engine_health_check
5
5
 
6
6
  get '404', to: 'application#page_not_found'
7
+ # FIXME: change to match, so POST and other methods are catched
8
+ # NOTE: via: :all is important
9
+ # match '404', to: 'application#page_not_found', via: :all
10
+ #
7
11
  # get '500', to: 'application#handle_internal_error'
8
12
  get 'internal_error_but_with_status200', to: 'application#internal_error_but_with_status200'
9
13
 
@@ -89,6 +89,10 @@ html
89
89
 
90
90
  - if using_modal?
91
91
  .px-2.d-flex.align-items-center.border.border-start-0
92
+ = button_tag type: :button, class: 'btn btn-sm btn-link',
93
+ data: { action: 'modal#back',
94
+ controller: :tooltip, 'bs-title': 'Volver' } do
95
+ i.bi-arrow-left
92
96
  = button_tag type: :button, class: 'btn btn-sm btn-link',
93
97
  data: { action: 'modal#maximize',
94
98
  controller: :tooltip, 'bs-title': 'Maximizar' } do
@@ -2,6 +2,6 @@
2
2
 
3
3
  # :nocov:
4
4
  module PgRails
5
- VERSION = '7.6.43'
5
+ VERSION = '7.6.45'
6
6
  end
7
7
  # :nocov:
@@ -1 +1 @@
1
- h1 el partiaaal
1
+ h1 FIXME or delete me
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.43
4
+ version: 7.6.45
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-07-20 00:00:00.000000000 Z
11
+ date: 2026-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails