homura-runtime 0.2.18 → 0.2.19
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/exe/compile-erb +11 -1
- data/lib/cloudflare_workers/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: 94e4ec7af2878bc59ebedd0ebe8841d5852b4fb35d736d713a62ce1ef1bb1cfb
|
|
4
|
+
data.tar.gz: 6f21d253588daa097a1541ddd017b58a28b10c38ccc703f2a3ee9e6c650f490f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd0b2cb20babf2fe3cb57167dfdc509fef69ccd5d141cf44c0a370b9e8aca29425267433eb4fdf002b0e081583c8028deb1799d4e8c53e808a2b175f2a611c7e
|
|
7
|
+
data.tar.gz: d794586f918cef8b0cabebec3923525078c69a9b68e75e0da96096ffa8afdc02aceb6cd277b07f8b15c0396a3f6f6b6ecf77e2c0c9308cd27624acce320b45ad
|
data/exe/compile-erb
CHANGED
|
@@ -415,6 +415,16 @@ def emit_sinatra_patch(io, namespace)
|
|
|
415
415
|
end
|
|
416
416
|
end
|
|
417
417
|
|
|
418
|
+
# A template is "layout-like" if its name is `:layout` or starts
|
|
419
|
+
# with `layout_` (e.g. `:layout_docs`). The auto-layout pass in
|
|
420
|
+
# `erb` skips wrapping such templates in `:layout` so that
|
|
421
|
+
# rendering `:layout_docs` doesn't end up nested inside `:layout`,
|
|
422
|
+
# which would otherwise produce a duplicate header / nav.
|
|
423
|
+
def __homura_layout_template?(template)
|
|
424
|
+
name = template.to_sym
|
|
425
|
+
name == :layout || name.to_s.start_with?('layout_')
|
|
426
|
+
end
|
|
427
|
+
|
|
418
428
|
# homura patch: dispatch to precompiled templates when we
|
|
419
429
|
# have one. Unknown symbols raise a clear message instead of
|
|
420
430
|
# wandering into upstream Tilt, which would blow up on
|
|
@@ -432,7 +442,7 @@ def emit_sinatra_patch(io, namespace)
|
|
|
432
442
|
|
|
433
443
|
layout = options[:layout]
|
|
434
444
|
layout = false if layout.nil? && options.include?(:layout)
|
|
435
|
-
if layout.nil? && template
|
|
445
|
+
if layout.nil? && !__homura_layout_template?(template) && ::#{namespace}.registered?(:layout)
|
|
436
446
|
layout = :layout
|
|
437
447
|
end
|
|
438
448
|
if layout
|