view_component 4.24.0 → 4.25.0

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: 3c6a2ef3282bf3383716c47d113e3a9ed1dccc6aee4f643080aedece5961445a
4
- data.tar.gz: ad941d4a4ca2b8e155dff3bd2ed52a0213d6bfc808c65abc67e5d2e069d300e7
3
+ metadata.gz: 0cd875399758c82426fbf9c6af2fe4f0b89327a938799fb179d03ff24407a59b
4
+ data.tar.gz: 105949e0810703937fd64c7bfb45f9d641d189fa1493fcb19b20c3efa4b0576c
5
5
  SHA512:
6
- metadata.gz: ed286a2767cb14109d867255023c4feb6945288cc2dd4351c64ffa03203a89702a8ca75b7a79cd68c64ebc7b9e96a1a2e81e7445f61fc975ce06311c4a47d872
7
- data.tar.gz: 9893da43af8559c0aee6226b4d0dd2fa96f32ec41b1fc60b14106e0d689666a5a1833af99da1cf72d568ef8a85b79854a3bbe4ef198128d9dde35c0f86cea24a
6
+ metadata.gz: 625542a09b7bd7fe423e59a64ff89487d48c7a123874a1390f13f947ab782ad4567fd656abcfc238096a6b06a30e495c634d10d55d6e89145eb659e686fc3555
7
+ data.tar.gz: 33bd7f7d84027037faf299c7904a936f2848a3001ccf632cf9bde3e5ccabeb9bb5375a3dde009669228fbfc0dff790e8875f2d092fea6d59ce7bdef3b944e36c
data/docs/CHANGELOG.md CHANGED
@@ -10,6 +10,24 @@ nav_order: 6
10
10
 
11
11
  ## main
12
12
 
13
+ ## 4.25.0
14
+
15
+ * Fix inherited `#call` methods overriding subclass sidecar templates for non-HTML requests.
16
+
17
+ *Joel Hawksley*
18
+
19
+ * Pin Chrome in all Primer ViewComponents compatibility suites to match upstream system tests.
20
+
21
+ *Joel Hawksley*
22
+
23
+ * Fix automated dependency updates when Ruby head includes unpublished default gems, including frozen CI installs.
24
+
25
+ *Joel Hawksley*
26
+
27
+ * Update all bundle lockfiles and both Rails main builds through a single daily automated pull request.
28
+
29
+ *Joel Hawksley*
30
+
13
31
  ## 4.24.0
14
32
 
15
33
  * Harden GitHub Actions workflows and dependency updates to address code-scanning alerts.
@@ -85,7 +85,7 @@ module ViewComponent
85
85
  #
86
86
  # @return [Array<Symbol>]
87
87
  def template_formats
88
- gather_templates.map { |template| template.format || :html }.uniq
88
+ gather_templates.map { |template| template.format || Template::DEFAULT_FORMAT }.uniq
89
89
  end
90
90
 
91
91
  # @private
@@ -255,7 +255,10 @@ module ViewComponent
255
255
  if inherited.any?
256
256
  # A format and a variant can share a public call_* alias.
257
257
  inherited.each do |template|
258
- next if templates.any? { |own| own.variant == template.variant && own.format == template.format }
258
+ next if templates.any? do |own|
259
+ own.variant == template.variant &&
260
+ (own.format || Template::DEFAULT_FORMAT) == (template.format || Template::DEFAULT_FORMAT)
261
+ end
259
262
 
260
263
  templates << Template::Inherited.new(component: @component, template: template)
261
264
  end
@@ -3,7 +3,6 @@
3
3
  module ViewComponent
4
4
  class Template
5
5
  DEFAULT_FORMAT = :html
6
- private_constant :DEFAULT_FORMAT
7
6
 
8
7
  # Rails 8.1 added a newline to compiled ERB output (rails/rails#53731).
9
8
  ERB_NEWLINE_RAILS_VERSION = Gem::Version.new("8.1.0.alpha")
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 4
6
- MINOR = 24
6
+ MINOR = 25
7
7
  PATCH = 0
8
8
  PRE = nil
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.24.0
4
+ version: 4.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ViewComponent Team