ruact 0.0.10 → 0.0.11
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 +14 -1
- data/README.md +2 -2
- data/lib/ruact/version.rb +1 -1
- data/spec/benchmarks/baseline.json +12 -1
- data/spec/benchmarks/render_pipeline_benchmark_spec.rb +17 -0
- 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: 42a39cfc564acac7e1d22f07e8e1d91f143b37128a49406ecb881d2744c2ad42
|
|
4
|
+
data.tar.gz: c54b94ecdd51a1e93c37573c6c90edffab769077e965a82038a04796edbdf88a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e373a60076006eebecb968c0d6b887c05cac93c2715871df1376cd8bdf193fd01dd23e3f8317228dd350a7856da398ed92984c77a043eb7cbac051a1ef67be30
|
|
7
|
+
data.tar.gz: 2afec776569f7d7821b42df6d9d1c493648eae3b083f062f9cc0baa835a8ea26b62dbae3c4c46188e9f0021c125c1cf9c19df491275c3844461076d5c24bf47e
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.0.11] - 2026-08-25
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **The README's first sentence shows the tag instead of naming its casing convention.** It read *"Write a PascalCase tag in ERB, pass `@post` as a prop"* — which put a mechanism in the slot where the reader is still asking what they get. It also worked against the thing it was selling: for anyone arriving from React, a capitalized component tag is not a new rule, it is exactly how JSX already behaves, so naming the convention turned the familiar into a ritual to comply with. The line now shows `<LikeButton likes={@likes} />` and lets the capital letter speak for itself, with the Ruby value passed in demonstrating the no-serializer claim the sentence used to only assert. The `ERB as server components` bullet states the same mechanism one beat later, where it lands as reassurance rather than a requirement: capitalized is React, lowercase stays HTML.
|
|
15
|
+
|
|
16
|
+
The Concepts pages and the API reference are deliberately **unchanged** — a reader there is asking exactly how resolution works, and naming the convention is the right answer in that position.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **The render-pipeline allocation baseline was still the one written on the first commit.** `spec/benchmarks/baseline.json` had held April's numbers (1623 typical / 7764 heavy) since the initial commit, so the ×1.20 tolerance was being measured against a pipeline that predates route-driven codegen, contract validation and error suggestion. Four months of that work grew the typical render by 10.4% — legitimate growth, not a regression from any one change — and it finally crossed the limit. Because a single global baseline also has to absorb the ~9% spread between matrix cells (Ruby 3.4 / Rails 8.1 measures 1792 where Ruby 3.3 / Rails 7.1 measures ~1958), the overshoot surfaced as one intermittently red cell while twelve stayed green — which reads as flakiness and is not: rerunning did not fix it. Rebaselined to today's measurement, with April's numbers kept in a `_history` key rather than overwritten, and the spec now documents how to tell a regression from drift and how to regenerate the file.
|
|
21
|
+
|
|
10
22
|
## [0.0.10] - 2026-08-25
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -247,7 +259,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
247
259
|
- **CI matrix** — GitHub Actions: RSpec across Ruby 3.2 × 3.3 × Rails 7.0 × 7.1 × 7.2 × 8.0; RuboCop; YARD docs; memory benchmark; E2E system tests against React 19.0.0 and 19.x (Capybara + Cuprite); non-blocking React@next job with auto-issue on failure.
|
|
248
260
|
- **E2E test app** — `e2e/` Rails app (no DB, in-memory Post model) with full CRUD system tests validating the complete request cycle.
|
|
249
261
|
|
|
250
|
-
[Unreleased]: https://github.com/luizcg/ruact/compare/v0.0.
|
|
262
|
+
[Unreleased]: https://github.com/luizcg/ruact/compare/v0.0.11...HEAD
|
|
263
|
+
[0.0.11]: https://github.com/luizcg/ruact/releases/tag/v0.0.11
|
|
251
264
|
[0.0.10]: https://github.com/luizcg/ruact/releases/tag/v0.0.10
|
|
252
265
|
[0.0.9]: https://github.com/luizcg/ruact/releases/tag/v0.0.9
|
|
253
266
|
[0.0.8]: https://github.com/luizcg/ruact/releases/tag/v0.0.8
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ruact
|
|
2
2
|
|
|
3
|
-
**Real React, right in your Rails views.** Write
|
|
3
|
+
**Real React, right in your Rails views.** Write `<LikeButton likes={@likes} />` in an ERB template and a React component renders, with a Ruby value passed straight in — no hand-written JSON layer, no Node process in production.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/luizcg/ruact/actions/workflows/ci.yml) [](https://badge.fury.io/rb/ruact) [](https://codecov.io/gh/luizcg/ruact)
|
|
6
6
|
|
|
@@ -88,7 +88,7 @@ The verb decides — there is no per-action DSL and no second endpoint. The expo
|
|
|
88
88
|
|
|
89
89
|
Every item below is shipped in this gem at v0.0.9:
|
|
90
90
|
|
|
91
|
-
- **ERB as server components** — `include Ruact::Controller`, then
|
|
91
|
+
- **ERB as server components** — `include Ruact::Controller`, then use your components by name in the views you already have: capitalized is React, lowercase stays HTML. [Docs](https://ruact.dev/docs/concepts/erb-as-server-components)
|
|
92
92
|
- **`"use client"`** — the one directive that marks a file as client-side. The bundled Vite plugin scans for it and writes the manifest. [Docs](https://ruact.dev/docs/concepts/use-client)
|
|
93
93
|
- **Server functions and queries** — `include Ruact::Server` and `Ruact::Query` + `useQuery`, both reachable through a typed module generated from your route table. [Docs](https://ruact.dev/docs/api/server-actions)
|
|
94
94
|
- **Props are an allowlist** — `include Ruact::Serializable` + `ruact_props :id, :title`; other columns never cross. [Docs](https://ruact.dev/docs/api/serializable)
|
data/lib/ruact/version.rb
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"typical_allocations": 1792,
|
|
3
|
+
"heavy_allocations": 8669,
|
|
4
|
+
"_measured_on": "2026-08-25, Ruby 3.4.5 / Rails 8.1, gem at v0.0.10",
|
|
5
|
+
"_history": {
|
|
6
|
+
"2026-04-19": {
|
|
7
|
+
"typical_allocations": 1623,
|
|
8
|
+
"heavy_allocations": 7764,
|
|
9
|
+
"note": "Original baseline, written by the spec's first run at the initial commit. Superseded 2026-08-25: four months of pipeline work (route-driven codegen, contract validation, error suggestion) grew the typical render past the 20% tolerance measured against April's code. The overshoot was cumulative and legitimate, not a regression from any single change; it surfaced as an intermittently red matrix cell because ONE global baseline cannot absorb the ~9% spread between Ruby/Rails combinations (Ruby 3.3 / Rails 7.1 measured ~1958 while Ruby 3.4 / Rails 8.1 measured 1792). Growth since April: typical +10.4%, heavy +11.7%."
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -7,6 +7,23 @@ require "json"
|
|
|
7
7
|
|
|
8
8
|
BENCHMARK_BASELINE_FILE = File.expand_path("baseline.json", __dir__)
|
|
9
9
|
|
|
10
|
+
# The baseline is a SINGLE measurement shared by every matrix cell, while the
|
|
11
|
+
# same render allocates differently per Ruby/Rails combination — measured at
|
|
12
|
+
# ~9% spread (Ruby 3.4/Rails 8.1: 1792; Ruby 3.3/Rails 7.1: ~1958). The x1.20
|
|
13
|
+
# tolerance therefore absorbs two different things at once: that cross-version
|
|
14
|
+
# spread AND real growth. When the two together cross the limit, ONE cell goes
|
|
15
|
+
# red while the rest stay green, which reads like flakiness and is not — rerunning
|
|
16
|
+
# does not fix it.
|
|
17
|
+
#
|
|
18
|
+
# Before rebaselining, check WHICH it is. A number that moved with a code change
|
|
19
|
+
# is a regression and belongs in the diff, not in this file. A number that drifted
|
|
20
|
+
# across many changes has outgrown its anchor, and the honest move is to rebaseline
|
|
21
|
+
# and record the growth in baseline.json's `_history` (see the 2026-08-25 entry).
|
|
22
|
+
#
|
|
23
|
+
# To regenerate: delete baseline.json and run this file TWICE (the first run writes
|
|
24
|
+
# `typical_allocations`, the second fills `heavy_allocations`), then restore the
|
|
25
|
+
# `_measured_on` / `_history` keys, which the spec does not write.
|
|
26
|
+
|
|
10
27
|
RSpec.describe "RenderPipeline benchmark" do
|
|
11
28
|
include RSpec::Benchmark::Matchers
|
|
12
29
|
|