trmnl_preview 0.32.0 → 0.32.1

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: cff23f63336a6438a489b38cfdee98b090018a82ea3aa97733234bc4a163bda3
4
- data.tar.gz: 02af5ef2992fceaf3452e99dce8aaea7500abeda1661ae452bd25b43b4cfd440
3
+ metadata.gz: 3466bcd07fed1c8ff658708ab71e6a7d8c42c70395baff5f72de8671dbdec9d2
4
+ data.tar.gz: 871fdb7df75979caf9a19727f26621653a028fd0d37a9d39afeee10c67ac920f
5
5
  SHA512:
6
- metadata.gz: 6f2bd44aa5e6f2a607719446356a76e97ad5eb30c8be7d671e59686d0d2d179a53c4e9801c027e0354e9b34397fd863b167347a0df9c4e40884ebc49dddcbdda
7
- data.tar.gz: e3212337cd34f74ebd9c8994b0853341413d48b2b7c7d5e225e9266385405365f47822c1890d51d3b10329d49cbad249af0be35b60c50f84656cfa91d4ce608b
6
+ metadata.gz: d818264f98865e742f29d61bc8514726f951ccc3c0074e78a00472d19e10fd7c4071940506228a389d07989a6231f47d16342f7d119027a231ba514b415e020e
7
+ data.tar.gz: 69f1e91eacc992904e2de3a6d289e5abda4b65caf51dcc6948f602b5794322b993dd8628e7a946cffe8aad2a757a24759ad12c5390bd2e96b9cdf4b69861a749
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.32.1
5
+
6
+ - `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.
7
+
4
8
  ## 0.32.0
5
9
 
6
10
  - `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.
@@ -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:)
@@ -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 template or script draws when its data is missing.
25
- LEAKED_TEXT_PATTERN = /Liquid (?:syntax )?error|\bundefined\b|\bNaN\b|\bnull\b|\[object Object\]|\{\{|\{%/
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRMNLP
4
- VERSION = '0.32.0'
4
+ VERSION = '0.32.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rockwell Schrock