trmnl_preview 0.25.0 → 0.27.0

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: 70b815c128b20e0573632c988b2b170eb1721c5715af5a590e294315b2b0ea53
4
- data.tar.gz: 101648b396d697a8f19fcfc91b342bd008b982cc59467b9a051726cc0d320540
3
+ metadata.gz: ddab525950f3e01ae9fd4e07afb80de6561f5c88f5f5a307f46c2578f057c4fa
4
+ data.tar.gz: 38563769627d50fae1b5f3aee125a99f1661ebb703655adc5cce7133e5371d85
5
5
  SHA512:
6
- metadata.gz: caa796947c50819b618aefc48602524691a541adbb39b56b588fc85f5b95ca2ea323310e85ab20af4d33911f781f582e218fab1e3d56a2717679cccd90311894
7
- data.tar.gz: bc0a881a929cf6548518f21e05f6ca7264a114dd1db1de178d203cfe1c853e583b67b9fef53de8f9617ccff2e7e8784eb064b46354934ca7ee7654913331e3d5
6
+ metadata.gz: 63e93e72f98d094dc6630394a968d30bca3020fc5938f32654b1b3c7c55fad6aa5456ba25c184c12ebfa1a7f0a9ffcb3efd55d1f3699a1a7ae18dbffc8e3ee4c
7
+ data.tar.gz: ac550f4ff63967bd8a4a47e7923919ffa889332706e99129e7e454df4065c303d34d6a7d572321234c435ab301c630cb3085647722b56e52ba1c9bad704773e0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.27.0
5
+
6
+ - `trmnlp lint` reports a webhook recipe with no `copyable_webhook_url` custom field (`webhook_url_shown`), as TRMNL's recipe review does. Without it, people who install the recipe have no field to copy their webhook URL from.
7
+ - A release pinned in a plugin's `bin/trmnlp`, such as `IMAGE=trmnl/trmnlp:v0.24.0`, is used when another copy of the script is on the PATH as `trmnlp`. The plugin ran the PATH copy's image instead. To get the fix in an existing plugin, run `trmnlp init` there and overwrite only `bin/trmnlp`.
8
+ - `trmnlp version` says when it runs in Docker, and in which image, on a second line on stderr. The version stays alone on stdout.
9
+
10
+ ## 0.26.0
11
+
12
+ - `trmnlp lint` names the sizes an element has when a size class is missing (`framework_classes_exist`), such as `title--small` to `title--xxlarge` for `title--mega`, and links to the Framework's Element Sizes page. Each element has its own set of sizes.
13
+ - The `hn-stories` example uses `title--small` in its half views. It had `title--xsmall`, which no Framework release has, so those titles rendered at the default size.
14
+ - `trmnlp lint` reports a Framework class behind screen prefixes that its release does not define for it (`framework_prefixes_exist`): a prefix that does not exist, such as `xl:value--large`, prefixes out of order, such as `portrait:lg:value--large`, or a prefix the class has no variant for, such as `dark:value--large`. TRMNL ignores the class and says nothing. The lists come from each release's `plugins.css`; `rake framework:classes` refreshes them.
15
+ - `trmnlp lint` reports a plain `https://` link in a custom field's description (`custom_field_links_embedded`), as TRMNL's recipe review does. An embedded `<a>` link is shorter, opens in a new tab and is plainly clickable; a link written without `https://` stays an unlinked example.
16
+ - `trmnlp lint` reports a `settings.yml`, view or transform over 100 KB (`files_under_upload_limit`). TRMNL refuses to import such a file, so `trmnlp push` failed, even when a transform trims the data and the plugin renders in `serve`. Thanks to @barrymichaeldoyle for #252.
17
+
4
18
  ## 0.25.0
5
19
 
6
20
  - `trmnlp lint` also reports a `content--` class that the plugin's Framework release does not have (`framework_classes_exist`), such as `content--xsmall`. Rich Text sizes stop at `content--small`, and a missing one leaves the text at the default size.
data/README.md CHANGED
@@ -13,16 +13,18 @@ The server watches the filesystem for changes to the Liquid templates, seamlessl
13
13
 
14
14
  ## Quick Start
15
15
 
16
- trmnlp requires Ruby 4.0 or newer. Check with `ruby -v` before installing.
16
+ With [Docker](https://docs.docker.com/get-docker/) installed:
17
17
 
18
18
  ```sh
19
- gem install trmnl_preview # install
19
+ mkdir -p ~/.local/bin # install
20
+ docker run --rm --entrypoint cat trmnl/trmnlp /app/templates/init/bin/trmnlp > ~/.local/bin/trmnlp
21
+ chmod +x ~/.local/bin/trmnlp
20
22
  trmnlp init my_plugin # scaffold a project
21
23
  cd my_plugin
22
24
  trmnlp serve # preview at http://localhost:4567
23
25
  ```
24
26
 
25
- No Ruby on hand? Run it through Docker instead — see [Installing via Docker](#installing-via-docker).
27
+ Have Ruby 4.0 or newer? `gem install trmnl_preview` starts faster — see [Installing via RubyGems](#installing-via-rubygems).
26
28
 
27
29
  ## Project Structure
28
30
 
@@ -227,21 +229,7 @@ The `bin/trmnlp` script is provided as a convenience. It will use the local Ruby
227
229
 
228
230
  You can modify the `bin/trmnlp` script to set up environment variables (plugin secrets, etc.) before running the server.
229
231
 
230
- **Gem or Docker?** Install the gem if you already have Ruby >= 4.0 — it has the fastest startup. Use Docker for zero local setup.
231
-
232
- ### Installing via RubyGems
233
-
234
- Prerequisites:
235
-
236
- - Ruby >= 4.0
237
- - For PNG rendering (optional):
238
- - Firefox
239
- - ImageMagick
240
-
241
- ```sh
242
- gem install trmnl_preview
243
- trmnlp serve
244
- ```
232
+ **Docker or gem?** The Docker image has everything trmnlp needs, including Firefox and the tools `trmnlp test` uses. The gem starts a little faster, but needs Ruby 4.0 and those tools installed yourself.
245
233
 
246
234
  ### Installing via Docker
247
235
 
@@ -328,6 +316,24 @@ cd trmnlp
328
316
  docker build -t trmnlp .
329
317
  ```
330
318
 
319
+ ### Installing via RubyGems
320
+
321
+ Prerequisites:
322
+
323
+ - Ruby >= 4.0
324
+ - For PNG rendering and `trmnlp test`:
325
+ - Firefox
326
+ - ImageMagick 7
327
+ - For some `trmnlp test` features ([Testing](docs/testing.md)):
328
+ - libfaketime, for a transform's clock with `now:`
329
+ - zbar, for `have_qr_code`
330
+ - Node 24, Python or PHP, for a transform in that language
331
+
332
+ ```sh
333
+ gem install trmnl_preview
334
+ trmnlp serve
335
+ ```
336
+
331
337
  ## `.trmnlp.yml` Reference - Project Config
332
338
 
333
339
  The `.trmnlp.yml` file lives in the root of the plugin project, and is for configuring the local dev server.