proscenium 0.24.1-aarch64-linux → 0.24.2-aarch64-linux

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: 9a3c2342c13ecc8f74633f806e135140427f37e9886433c2c9c12984823c3d44
4
- data.tar.gz: d16c89353c53a1379941cc5f916d617012bd0d55da2b7cb956b05d22b40433b9
3
+ metadata.gz: 43acf11d78e034b6b380bddce1da1d1ddfb18b9d3faaff278a8cda06ad75a31c
4
+ data.tar.gz: 4f4f47e8bacad1fa1e81a464a023cedcf1e87d86190ad03217bbd9d0be79a645
5
5
  SHA512:
6
- metadata.gz: 2ca84ecb37b878d95afec420a3168e3861bd88ef4e1b4baa5ddf3e270cf849dd2d9e317dad84a3ade7aaebeb84e28d34c4e5c221907dfab0ef8e6ed068c5329c
7
- data.tar.gz: 8ba34b73a200991c2a23a3e33a755c8d6b205314a5e6111d4ee8925d265397e3ae6a8ada9cabed38b55250e8266ba3eb1f7a7a9214518be2bdb2e001f59f56bd
6
+ metadata.gz: d9d1380bed47d412ee510923a7086960c7d976f84b1151d25795f91caad4818e00f631c60e3419abc2f67279f9580109aa77e23467e4aa6487c302c59a3f0b8b
7
+ data.tar.gz: 0f495033d2d33a10050f9888da434520529a0d8fc18ef478e2a8d8152bb7356056ab83aed0a5153be789af20ae2186fbd044bc57344077a06b8acced01659844
Binary file
@@ -28,9 +28,7 @@ module Proscenium
28
28
  return if response_body.first.blank? || !Proscenium::Importer.css_imported?
29
29
 
30
30
  included_comment = response_body.first.include?(CSS_COMMENT)
31
- fragments = if (fragment_header = request.headers['X-Fragment'])
32
- fragment_header.split
33
- end
31
+ fragments = proscenium_fragment_header&.split(/[,\s]+/)
34
32
 
35
33
  return if !fragments && !included_comment
36
34
 
@@ -55,9 +53,7 @@ module Proscenium
55
53
  return if response_body.first.blank? || !Proscenium::Importer.js_imported?
56
54
 
57
55
  included_comment = response_body.first.include?(JS_COMMENT)
58
- fragments = if (fragment_header = request.headers['X-Fragment'])
59
- fragment_header.split
60
- end
56
+ fragments = proscenium_fragment_header&.split(/[,\s]+/)
61
57
 
62
58
  return if !fragments && !included_comment
63
59
 
@@ -77,6 +73,17 @@ module Proscenium
77
73
  response_body.first.gsub! JS_COMMENT, out.join.html_safe
78
74
  end
79
75
  end
76
+
77
+ private
78
+
79
+ # Fragment rendering: phlex-rails 1.x used `X-Fragment`, phlex-rails 2.x uses `X-Fragments`.
80
+ # Honour both so side-loaded assets are injected into fragment responses regardless of the
81
+ # phlex-rails version in use. The value is only used as a presence flag (all imported assets
82
+ # are injected — Proscenium does not filter by fragment name), so the split delimiter is
83
+ # cosmetic; splitting on comma or whitespace covers both conventions (plural is comma-based).
84
+ def proscenium_fragment_header
85
+ request.headers['X-Fragment'] || request.headers['X-Fragments']
86
+ end
80
87
  end
81
88
 
82
89
  class << self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.24.1'
4
+ VERSION = '0.24.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
4
+ version: 0.24.2
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Joel Moss