pg_rails 7.6.42 → 7.6.43
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 +4 -4
- data/pg_engine/app/controllers/admin/simple_user_notifiers_controller.rb +0 -1
- data/pg_engine/app/controllers/concerns/pg_engine/resource.rb +7 -4
- data/pg_engine/app/controllers/concerns/pg_engine/tenant_helper.rb +0 -1
- data/pg_engine/app/controllers/pg_engine/health_controller.rb +8 -1
- data/pg_engine/app/helpers/pg_engine/form_helper.rb +0 -1
- data/pg_engine/lib/pg_engine/active_job_extensions.rb +1 -1
- data/pg_engine/lib/pg_engine/mailgun/log_sync.rb +1 -1
- data/pg_engine/lib/pg_engine/navigator.rb +0 -1
- data/pg_engine/lib/pg_engine/test/dummy_brand.rb +1 -1
- 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: a32df0403ce2d6750bef9c081329cf0b64d50170aa9419784c69196781c43a03
|
4
|
+
data.tar.gz: c14290d74b1c8e382dfeacdf0d6d507116d5abbd8f48196e77b2893199a212a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd4228c52176a156318f9f25fffdbdfa3095192d7a18e85b9adb4c70f5b14ef71317e7a6fdfb3ac014cbd614f1a08c3c3486f1a75825d5f8c7584503e638aef7
|
7
|
+
data.tar.gz: d47e45800ff171164c443b924f6f7b7d40347ef57aaf7c15419aa378f1c3ddf1dc00642cfffe3661e0cd3ac2f299903124a092e5603450e645c940642556981f
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module PgEngine
|
2
2
|
module Resource
|
3
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
4
3
|
def self.included(clazz)
|
5
4
|
class << clazz
|
6
5
|
# This is a per class variable, all subclasses of clazz inherit it
|
@@ -86,7 +85,6 @@ module PgEngine
|
|
86
85
|
|
87
86
|
clazz.layout :set_layout
|
88
87
|
end
|
89
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
90
88
|
|
91
89
|
def column_options_for(_object, _attribute)
|
92
90
|
{ class: 'text-nowrap' }
|
@@ -293,7 +291,14 @@ module PgEngine
|
|
293
291
|
protected
|
294
292
|
|
295
293
|
def discard_undiscard(method)
|
294
|
+
object = instancia_modelo
|
296
295
|
if instancia_modelo.send(method)
|
296
|
+
if method == :discard
|
297
|
+
ActiveSupport::Notifications.instrument("record_discarded.pg_engine", object)
|
298
|
+
else
|
299
|
+
ActiveSupport::Notifications.instrument("record_restored.pg_engine", object)
|
300
|
+
end
|
301
|
+
|
297
302
|
if accepts_turbo_stream?
|
298
303
|
body = <<~HTML.html_safe
|
299
304
|
<pg-event data-event-name="pg:record-updated" data-reload="true" data-turbo-temporary>
|
@@ -475,7 +480,6 @@ module PgEngine
|
|
475
480
|
end
|
476
481
|
end
|
477
482
|
|
478
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
479
483
|
def pg_respond_destroy(model, land_on = nil)
|
480
484
|
if destroy_model(model)
|
481
485
|
ActiveSupport::Notifications.instrument("record_destroyed.pg_engine", model)
|
@@ -513,7 +517,6 @@ module PgEngine
|
|
513
517
|
redirect_back(fallback_location: root_path, status: 303)
|
514
518
|
end
|
515
519
|
end
|
516
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
517
520
|
|
518
521
|
def destroy_model(model)
|
519
522
|
@error_message = I18n.t('pg_engine.resource_not_destroyed', model: model.class)
|
@@ -11,11 +11,19 @@ module PgEngine
|
|
11
11
|
check_postgres
|
12
12
|
check_websocket
|
13
13
|
check_ssl
|
14
|
+
# FIXME: make configurable
|
15
|
+
check_good_job unless ENV.fetch("HEALTH_CHECK_SKIP_GOOD_JOB", nil) == "1"
|
14
16
|
render_up
|
15
17
|
end
|
16
18
|
|
17
19
|
private
|
18
20
|
|
21
|
+
def check_good_job
|
22
|
+
return if GoodJob::Process.active.count.positive?
|
23
|
+
|
24
|
+
raise PgEngine::Error, 'good_job is down'
|
25
|
+
end
|
26
|
+
|
19
27
|
def check_postgres
|
20
28
|
return if User.count.is_a? Integer
|
21
29
|
|
@@ -28,7 +36,6 @@ module PgEngine
|
|
28
36
|
raise PgEngine::Error, 'redis is down'
|
29
37
|
end
|
30
38
|
|
31
|
-
# rubocop:disable Metrics/MethodLength
|
32
39
|
def check_websocket
|
33
40
|
result = nil
|
34
41
|
begin
|
@@ -8,7 +8,7 @@ module PgEngine
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def deserialize(job_data)
|
11
|
-
::Current.app_name = job_data.delete('app_name')
|
11
|
+
::Current.app_name = job_data.delete('app_name')&.to_sym
|
12
12
|
::Current.user = User.find(job_data.delete('user_id')) if job_data['user_id'].present?
|
13
13
|
|
14
14
|
super
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PgEngine
|
2
2
|
module Test
|
3
3
|
class DummyBrand < PgEngine::SiteBrand
|
4
|
-
def initialize(skip_default_url_options: Rails.env.test?)
|
4
|
+
def initialize(skip_default_url_options: Rails.env.test?)
|
5
5
|
super()
|
6
6
|
|
7
7
|
@default_site_brand = :factura
|
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.43
|
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-
|
11
|
+
date: 2025-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|