pg_rails 7.0.8.pre.alpha.89 → 7.0.8.pre.alpha.91

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: d8141d5335d0993a419e183b7cb6ae3d30c89d77b2f0e620b03279f5971e6d21
4
- data.tar.gz: 93f2de289e395627774991e6464d212430ca264cf5b7ec6ab5e89d007ed82353
3
+ metadata.gz: 0add80789e228fa1d0540ec0cd76fa458a6bce695d171813b43047608a930980
4
+ data.tar.gz: 114d7d400e5f6d5f42a99454e365f6bd9cffe5d190d982be1d1aff66957ce646
5
5
  SHA512:
6
- metadata.gz: fc6fa69e44fb872daae120dbadfa520789670fa96028e638de435b39cf44d9c183e5a42de0efe631849131b06c2f58808c5b2a207141f3c6c84cd92bb9e807da
7
- data.tar.gz: 2a8f1e7b7d327364f58be8844f1d9b77468cb6154b0526b5ce4ccaa80037e89a07df9d6927471a37587425a9c634dbbfc45a567dbe7f022dc6a124cf97bec628
6
+ metadata.gz: 6e5bad46380cec016f7a567a6ccef77f16ca32c364b1f09f0fb753c03afc6d4bc0d42b8823ded44f46c5300c487b33e7863724e8b7775c51efbf26862517a8ad
7
+ data.tar.gz: 632abbaea6dbed4429648148125c65985a99a2648b1f97dd971d089794363bbd522000d170d2eae07bc5d6f023027d31748dd3bdeee359a076d7efa96055cfe0
@@ -1,5 +1,5 @@
1
1
  class BadRequestComponent < BaseComponent
2
- def self.alert_type
2
+ def alert_type
3
3
  :alert
4
4
  end
5
5
 
@@ -1,10 +1,10 @@
1
1
  class BaseComponent < ViewComponent::Base
2
- def self.alert_wrapped(view_context)
2
+ def alert_wrapped(view_context)
3
3
  AlertComponent.new(type: alert_type)
4
- .with_content(new.render_in(view_context))
4
+ .with_content(render_in(view_context))
5
5
  end
6
6
 
7
- def self.alert_type
7
+ def alert_type
8
8
  # :nocov:
9
9
  raise 'implement in subclass'
10
10
  # :nocov:
@@ -4,7 +4,7 @@ class InternalErrorComponent < BaseComponent
4
4
  super
5
5
  end
6
6
 
7
- def self.alert_type
7
+ def alert_type
8
8
  :critical
9
9
  end
10
10
 
@@ -34,13 +34,13 @@ module PgEngine
34
34
  def internal_error(error)
35
35
  pg_err error
36
36
 
37
- render_my_component(InternalErrorComponent, :internal_server_error)
37
+ render_my_component(InternalErrorComponent.new, :internal_server_error)
38
38
  end
39
39
 
40
40
  def invalid_authenticity_token(err)
41
41
  pg_warn err
42
42
 
43
- render_my_component(BadRequestComponent, :bad_request)
43
+ render_my_component(BadRequestComponent.new, :bad_request)
44
44
  end
45
45
 
46
46
  before_action do
@@ -91,7 +91,7 @@ module PgEngine
91
91
 
92
92
  protected
93
93
 
94
- def render_my_component(component, status) # rubocop:disable Metrics/AbcSize
94
+ def render_my_component(component, status)
95
95
  respond_to do |format|
96
96
  format.html do
97
97
  render component.alert_wrapped(view_context),
@@ -100,7 +100,7 @@ module PgEngine
100
100
  end
101
101
 
102
102
  format.turbo_stream do
103
- flash.now[component.alert_type] = component.new.render_in(view_context)
103
+ flash.now[component.alert_type] = component.render_in(view_context)
104
104
 
105
105
  render turbo_stream: (turbo_stream.remove_all('.modal') +
106
106
  render_turbo_stream_flash_messages),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.89'
4
+ VERSION = '7.0.8-alpha.91'
5
5
  end
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.89
4
+ version: 7.0.8.pre.alpha.91
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-06-05 00:00:00.000000000 Z
11
+ date: 2024-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 7.1.3.2
19
+ version: 7.1.3.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 7.1.3.2
26
+ version: 7.1.3.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: anycable
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -422,14 +422,14 @@ dependencies:
422
422
  requirements:
423
423
  - - "~>"
424
424
  - !ruby/object:Gem::Version
425
- version: 3.2.0
425
+ version: 3.2.2
426
426
  type: :runtime
427
427
  prerelease: false
428
428
  version_requirements: !ruby/object:Gem::Requirement
429
429
  requirements:
430
430
  - - "~>"
431
431
  - !ruby/object:Gem::Version
432
- version: 3.2.0
432
+ version: 3.2.2
433
433
  - !ruby/object:Gem::Dependency
434
434
  name: sassc
435
435
  requirement: !ruby/object:Gem::Requirement