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 +4 -4
- data/lib/proscenium/ext/proscenium +0 -0
- data/lib/proscenium/side_load.rb +13 -6
- data/lib/proscenium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43acf11d78e034b6b380bddce1da1d1ddfb18b9d3faaff278a8cda06ad75a31c
|
|
4
|
+
data.tar.gz: 4f4f47e8bacad1fa1e81a464a023cedcf1e87d86190ad03217bbd9d0be79a645
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9d1380bed47d412ee510923a7086960c7d976f84b1151d25795f91caad4818e00f631c60e3419abc2f67279f9580109aa77e23467e4aa6487c302c59a3f0b8b
|
|
7
|
+
data.tar.gz: 0f495033d2d33a10050f9888da434520529a0d8fc18ef478e2a8d8152bb7356056ab83aed0a5153be789af20ae2186fbd044bc57344077a06b8acced01659844
|
|
Binary file
|
data/lib/proscenium/side_load.rb
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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
|
data/lib/proscenium/version.rb
CHANGED