trmnl_preview 0.32.0 → 0.32.2
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/CHANGELOG.md +8 -0
- data/lib/trmnlp/renderer.rb +1 -1
- data/lib/trmnlp/testing/rspec.rb +3 -2
- data/lib/trmnlp/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: d9cf02342886e42a2a4b60b068657e4f58b446226febe78f8b8bcfa7758a8d54
|
|
4
|
+
data.tar.gz: 3d63d0f368a43254e0fd6b1ae134559ec58be55c1179fbc33a603ebcfd561e05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ab520c731381e951386bb168172c268a91732e94890e89a886dc685f5a980662b33ba6735138aa93374e96810dc1e405bb084b017debe6abb632dd72a9d152d
|
|
7
|
+
data.tar.gz: 4033ff9382961fa5b6500e3eea051b42bef94c2c73afbedd89a2a6e2d06f3d690a3ddb37fc63df96d642912a463310fcf49e1f6766b21da90b7ee02e0bc099d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
+
## 0.32.2
|
|
5
|
+
|
|
6
|
+
- The Docker image starts again. The 0.32.1 image kept the X display lock from its build in `/tmp`, so the display never started and every command, such as `trmnlp serve` or `trmnlp test`, waited forever. Running with `--tmpfs /tmp` worked around it. A stopped container started again had the same problem, and now clears the lock before the display starts. If the display still does not start, trmnlp stops within 10 seconds and prints why, where it used to wait forever.
|
|
7
|
+
|
|
8
|
+
## 0.32.1
|
|
9
|
+
|
|
10
|
+
- `trmnlp test`'s publishable recipe fails a view that has no markup file and no shared markup. It drew only "Missing template", and passed. The message now names the file from the plugin folder, such as `src/full.liquid`, not the folders on your computer.
|
|
11
|
+
|
|
4
12
|
## 0.32.0
|
|
5
13
|
|
|
6
14
|
- `asset_overrides` in `.trmnlp.yml` replaces a literal URL, or a URL prefix ending in `/`, with a local file, a local folder or another URL, so a plugin can be previewed and tested with a local build of its own script, images or fonts before they are published. `trmnlp serve`, `trmnlp test` and `trmnlp build --png` serve the overrides from the asset cache; `trmnlp build` keeps the published URLs, and `--bundle-assets` copies the files next to the HTML. A test can set its own overrides, also as inline content, and `--report` lists every swap. `trmnlp serve` redraws when an overridden file changes, from a local folder or from another URL such as a bundler's dev server.
|
data/lib/trmnlp/renderer.rb
CHANGED
|
@@ -64,7 +64,7 @@ module TRMNLP
|
|
|
64
64
|
def render_liquid_template(view, device: {})
|
|
65
65
|
template_path = paths.template(view)
|
|
66
66
|
unless template_path.exist? || paths.shared_template.exist?
|
|
67
|
-
raise RenderError, "Missing template: #{template_path}"
|
|
67
|
+
raise RenderError, "Missing template: #{template_path.relative_path_from(paths.root_dir)}"
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
parse_and_render(template_path, device:)
|
data/lib/trmnlp/testing/rspec.rb
CHANGED
|
@@ -21,8 +21,9 @@ require_relative 'snapshot'
|
|
|
21
21
|
module TRMNLP
|
|
22
22
|
module Testing
|
|
23
23
|
PLUGIN_DIR_ENV_KEY = 'TRMNLP_PLUGIN_DIR'
|
|
24
|
-
# What a
|
|
25
|
-
LEAKED_TEXT_PATTERN = /Liquid (?:syntax )?error
|
|
24
|
+
# What a page draws when its data or one of its templates is missing.
|
|
25
|
+
LEAKED_TEXT_PATTERN = Regexp.union(/Missing template|Liquid (?:syntax )?error/,
|
|
26
|
+
/\bundefined\b|\bNaN\b|\bnull\b|\[object Object\]|\{\{|\{%/)
|
|
26
27
|
|
|
27
28
|
def self.plugin_dir = ENV.fetch(PLUGIN_DIR_ENV_KEY, Dir.pwd)
|
|
28
29
|
|
data/lib/trmnlp/version.rb
CHANGED