kiln 0.1.3 → 0.1.4

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: a916926140a7c5f9d1863925d43a6c3d74f176ce78c5f8c2859e53398788189c
4
- data.tar.gz: 2da891ee303f11614b4c7bb128e979bad49aed63d192c0b0e1a84eaa5ab0e82a
3
+ metadata.gz: c77d38afe49d8d5149ee6491636fb192aa74679bb7599bdfab23785cb8aa7add
4
+ data.tar.gz: 87f254094d83833b82afc4ccf67d9d6eacbe964a663e89c35d15612525923cce
5
5
  SHA512:
6
- metadata.gz: 3498e1a0cd83aa9b30ed67290039b7ab48b66089b38cd2ed5e96cee491b304dfb209779c7eb689d60ef5f7803794a97285a7c5674088f291dd9b83da7209fb43
7
- data.tar.gz: 16d49359021d9d762e4faa27ea0ec514732f444370da92604b98b4834959f708b717e17fd3f190ce7642d96cba7d30cd183d813b61084b22ccbd1617602d9c7f
6
+ metadata.gz: 4439279aef4385538b9a80b73bc813221d44b4b9bc0261cc36a9d14b960142073f8de11e0401c659481ba6ff20f8eb1ebaf66fc91805b968b60feebc28d0659c
7
+ data.tar.gz: a61d697784e845141f7f88f0660ac70f93c15d36bdd860bf95705777f44a55c5a2a547bdf96043379daee586f04b395d56b52e09a3a5d60e711389d992d20f9f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4 (2026-11-13)
4
+
5
+ Breaking:
6
+
7
+ - A production build always compiles assets into a temporary directory. An existing
8
+ `public/assets/.manifest.json` no longer skips the compile, so a stale `public/assets` can't ship
9
+ old assets.
10
+
3
11
  ## 0.1.3 (2026-11-08)
4
12
 
5
13
  Breaking:
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="assets/brand/logo.png" alt="Kiln mascot, a small brick kiln" width="150">
3
+ </p>
4
+
1
5
  <h1 align="center">Kiln</h1>
2
6
 
3
7
  <p align="center">
@@ -8,28 +12,28 @@
8
12
  </p>
9
13
 
10
14
  <p align="center">
11
- Fire a Rails app into a static site.
15
+ Build a Rails app into a static site.
12
16
  </p>
13
17
 
14
18
  <p align="center">
15
- <a href="https://kiln.davafons.com">Docs</a> ·
19
+ <a href="https://kiln.davafons.com">Documentation</a> ·
16
20
  <a href="https://kiln.davafons.com/installation/">Installation</a> ·
17
21
  <a href="CHANGELOG.md">Changelog</a>
18
22
  </p>
19
23
 
20
- Kiln renders every GET route of a Rails app through Rack and writes plain files that any static host can serve. You build pages with normal Rails: routes, controllers, views, helpers, Turbo and Stimulus. Development stays `bin/rails server`.
21
-
22
- Routes are the page list. A route that needs params and has no param source fails the build, and every render error, missing asset and broken link is reported at once. Kiln knows nothing about your data: models and repositories stay ordinary app code.
24
+ Kiln sends a GET request through Rack for every route of a Rails app and writes each response to a file. Any static host can serve the result. You write the site with routes, controllers, views, the asset pipeline, Turbo and Stimulus, and work on it with `bin/rails server`.
23
25
 
24
- Requires Ruby 4.0+ and Rails 8.1+.
26
+ Kiln needs Ruby 4.0 or later and Rails 8.1 or later. It is at an early version, and the [changelog](CHANGELOG.md) lists breaking changes.
25
27
 
26
- ## Quick start
28
+ ## Build a site
27
29
 
28
30
  ```ruby
29
31
  # Gemfile
30
32
  gem "kiln"
31
33
  ```
32
34
 
35
+ Routes without params need no declaration. Routes with params need a param source or a skip:
36
+
33
37
  ```ruby
34
38
  # config/kiln.rb
35
39
  Kiln.configure do |config|
@@ -45,10 +49,32 @@ end
45
49
 
46
50
  ```sh
47
51
  RAILS_ENV=production bin/rails kiln:build # write the site to dist/
48
- bin/rails kiln:serve # look at it as a static host serves it
52
+ bin/rails kiln:serve # serve dist/ at http://localhost:4000
49
53
  ```
50
54
 
51
- The [documentation](https://kiln.davafons.com) covers declaring pages, configuration, writing views for a build, the Markdown content layer, testing, deploying and the known limits.
55
+ A build reports every render error, missing asset, broken link and route without params at once, exits with status 1 and leaves the previous output in place. See [Build](https://kiln.davafons.com/build/#errors) for each message.
56
+
57
+ ## Test it
58
+
59
+ ```ruby
60
+ require "kiln/test_helper"
61
+
62
+ class StaticSiteTest < ActiveSupport::TestCase
63
+ include Kiln::TestHelper
64
+
65
+ test("the site builds repeatably") { kiln_build(repeatable: true) { assert it.join("index.html").file? } }
66
+ test("the home page") { assert_page "/", selector: "h1", text: "Welcome" }
67
+ end
68
+ ```
69
+
70
+ ## Documentation
71
+
72
+ Start with the [introduction](https://kiln.davafons.com).
73
+
74
+ - [Install Kiln](https://kiln.davafons.com/installation/) and declare [pages](https://kiln.davafons.com/pages/).
75
+ - Read about [views and assets](https://kiln.davafons.com/views/) during a build, and the [Markdown](https://kiln.davafons.com/content/) layer.
76
+ - [Test](https://kiln.davafons.com/testing/) and [deploy](https://kiln.davafons.com/deploying/) the site.
77
+ - Look up [configuration](https://kiln.davafons.com/configuration/), the [build](https://kiln.davafons.com/build/) and the [known limits](https://kiln.davafons.com/limits/).
52
78
 
53
79
  ## Develop Kiln
54
80
 
@@ -58,7 +84,7 @@ bin/test
58
84
  bin/lint # RuboCop and bin/house-rules
59
85
  ```
60
86
 
61
- `test/dummy` is the Rails app the tests build. `docs/` is the documentation site, a Rails app that uses this repository's Kiln. Run `bin/rails server` there to work on it, and `RAILS_ENV=production bin/rails kiln:build` and `bin/rails test` to check it; CI runs both. `bin/house-rules` rejects em dashes, AI attribution, leftover tool-call markup, filler phrases and dead links in Markdown. [AGENTS.md](AGENTS.md) holds the rules a script cannot check.
87
+ `test/dummy` is the Rails app the tests build. `docs/` is the documentation site, a Rails app that uses this repository's Kiln. Run `bin/rails server` there to work on it, and `RAILS_ENV=production bin/rails kiln:build` and `bin/rails test` to check it; CI runs both. [AGENTS.md](AGENTS.md) holds the rules a script cannot check.
62
88
 
63
89
  Releases publish from a `vX.Y.Z` tag that matches `Kiln::VERSION`. CI runs first, then the release workflow publishes to RubyGems through trusted publishing.
64
90
 
data/lib/kiln/assets.rb CHANGED
@@ -37,11 +37,13 @@ module Kiln
37
37
  cleanup
38
38
  end
39
39
 
40
+ # A compiled public/assets is ignored: it can be older than the source, and a build must ship the
41
+ # assets the source compiles to now.
40
42
  def precompile?(app)
41
43
  assets = app.config.respond_to?(:assets) && app.config.assets
42
44
  return false unless assets.respond_to?(:server) && assets.manifest_path
43
45
 
44
- !assets.server && !Pathname(assets.manifest_path).exist?
46
+ !assets.server
45
47
  end
46
48
 
47
49
  # Propshaft only adds load paths that exist at boot. On a fresh checkout, a bundler such as
data/lib/kiln/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kiln
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiln
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Afonso
@@ -66,8 +66,8 @@ dependencies:
66
66
  - !ruby/object:Gem::Version
67
67
  version: '2.6'
68
68
  description: Kiln renders every GET route of a Rails app through Rack and writes plain
69
- files that any static host can serve. Routes are the single source of truth, and
70
- the build fails loudly.
69
+ files that any static host can serve. Every GET route is accounted for, and a build
70
+ reports every error at once.
71
71
  email:
72
72
  - dav@davafons.com
73
73
  executables: []