rails-profiler 0.35.1 → 0.35.3

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: deae1ffa2327cdd3603f1451a376444412a495cd544920c4ff7b91b53275a169
4
- data.tar.gz: 661c22ece7d423f81a12f283c5daafcca147b1bf8661ffa1a96ea7a42d962451
3
+ metadata.gz: d3e60e3a338360fd499866e03f8ab6c30208f18882a3a13dd892cc04aaac9aca
4
+ data.tar.gz: 0bf4ff094c9b03b179531086676f1077fbcfb3218f402ecc5d5f0677d598dead
5
5
  SHA512:
6
- metadata.gz: 668ccb4d779af6e835701b59df419eaf91daed287ccc3087dd45a74ad9e7e6895bc7c37c36d152e06d1f3ddbcc68181b539c1eb1dea98e3a5421c1bb35eac2b3
7
- data.tar.gz: 3511797c44acfea198604714c262eb8555a983f7e8392abc6788041dd9e18ff5ce29cb4814d6f64a364c6a921c89790a33e1bf3dc4eef085aa6bbaa877c7e8ad
6
+ metadata.gz: 0255bdc1eae2817e7a606d2c76eacd849b91dd30d518eb36a86e8ceb64356ef065c7f87a30f3ea8992866fff47616f5fc6ec3eb1a79fa513bf509dae6553c5a7
7
+ data.tar.gz: 9c5a33a03d2655be62d6d13607b4cf4f09e5322ea84dc2198cf2ef41f61cdc261aa8e56cc5ad6964aff4c8565c82961535ca977b15d3e16f4737f58f8d2ec766
data/CHANGELOG.md CHANGED
@@ -19,6 +19,60 @@ every commit of every tag interval is accounted for one way or the other.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.35.3] - 2026-10-17
23
+
24
+ <!-- stamped -->
25
+
26
+ ### Changed
27
+
28
+ - **Assets:** The JavaScript and CSS bundles are minified: the toolbar script goes from 177 KB to
29
+ 81 KB, the dashboard script from 447 KB to 222 KB and the stylesheet from 91 KB to 79 KB.
30
+ - **Toolbar:** The page interceptor script and the toolbar CSS are read and built once per
31
+ process instead of on every profiled page.
32
+
33
+ ### Fixed
34
+
35
+ - **Toolbar:** The toolbar style and the embedded profile layout now carry the request's CSP
36
+ nonce. An application whose policy has `style-src 'nonce-...'` and no `'unsafe-inline'` no
37
+ longer blocks them; without a CSP, no nonce is added.
38
+ - **Assets:** The toolbar and dashboard files (`profiler.js`, `profiler.css`,
39
+ `profiler-toolbar.js`) are now requested as `?v=<digest of the content>` and served for a year
40
+ as immutable, so a browser keeps them between visits and still loads the new ones after an
41
+ upgrade of the gem. The URL without `?v=` still works and is cached for an hour, and an
42
+ asset that is not built still answers the 404 that names `yarn build:full`.
43
+
44
+ ## [0.35.2] - 2026-10-17
45
+
46
+ <!-- stamped -->
47
+
48
+ ### Changed
49
+
50
+ - **Performance:** The patch on `Thread#initialize` that carries the profiling context into new
51
+ threads is now installed by the railtie, only when the profiler is `enabled`; a disabled profiler
52
+ no longer touches `Thread`.
53
+
54
+ ### Fixed
55
+
56
+ - **Cluster:** A worker forked from a process that had already started the cluster client (Puma in
57
+ cluster mode with `preload_app!`, a preloaded Unicorn) now gets its own heartbeat thread and
58
+ registers again with the master, through a `Process._fork` hook (Ruby 3.1 and later). Where the
59
+ hook is not available, call `Profiler::Cluster::MasterClient.restart_after_fork` from Puma's
60
+ `on_worker_boot`; see `docs/cluster.md`.
61
+ - **HTTP and request bodies:** A body is now kept as base64 when its bytes are binary (a NUL byte,
62
+ invalid UTF-8, mostly control characters), whatever `Content-Type` it was served with, and `font/`,
63
+ `application/x-protobuf` and `application/gzip` are recognized as binary types. A binary string
64
+ is no longer turned into `?` characters. A body whose `Content-Type` declares a charset other than UTF-8 (`ISO-8859-1`...) stays text, decoded from that charset. A `Net::HTTP` response read as a stream (`read_body`
65
+ with a block) is recorded with no body and `response_body_not_captured`, instead of the `inspect`
66
+ of the stream adapter.
67
+ - **Version:** `Profiler.version`, the version recorded in profiles and announced by the MCP server,
68
+ comes from `git describe` when the gem is mounted by path from a git checkout, so
69
+ `gem_version` is no longer always `0.0.0` there. A published gem keeps the version it was built
70
+ with, and `0.0.0` remains the fallback.
71
+ - **MCP:** The `profiler-mcp` executable reads the profiles the application's file storage wrote
72
+ under `tmp/rails-profiler` in the current directory; it read an empty memory store of its own and
73
+ always answered that there were no profiles.
74
+ - **Profile pages:** the `profiler-version` meta tag of the page layouts now reports `Profiler.version`, the same value the API returns, instead of the raw `Profiler::VERSION` constant. When the gem is mounted from a git checkout, every profile no longer shows a false "different version" warning.
75
+
22
76
  ## [0.35.1] - 2026-10-17
23
77
 
24
78
  <!-- stamped -->
@@ -95,6 +149,7 @@ every commit of every tag interval is accounted for one way or the other.
95
149
  (`charset=utf-7`, `charset=internal`) no longer loses its profile; the body is read as UTF-8 with
96
150
  invalid bytes replaced.
97
151
 
152
+
98
153
  ## [0.34.4] - 2026-10-16
99
154
 
100
155
  <!-- stamped -->