conformance-kit 0.5.0 → 0.5.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: 5a02143b58331881bf17f8f3fa4af58ed4a2e31293ecf91ec36c75dc6b88cf76
4
- data.tar.gz: ccf2d81afca57e37ac74347deb18baba5a08a1ee592d2ec10580cdee0aecba6b
3
+ metadata.gz: 85c4479dea517ce0134e8de41129abc6406b2ec9cb8dc4445f929bf44d5dd52b
4
+ data.tar.gz: 98562594df0dad55bc4b9a6a180a6337e3e66c02c67115bae8fe8fa52693f60c
5
5
  SHA512:
6
- metadata.gz: 379a96c84f23be361de24dc24e55f66c313e00290b3fbe47b9b54fd4848f0ea02051aa3dc4c9186cf1f363d3584711e12c10a90f43e9ac0a4d37a9646d55bc6c
7
- data.tar.gz: 8d4e996635a3e7b4b1d9b8d086d058c57fa6c16207b8f0d2a989aed19c9ed6ea9e22cdb0af000ebd178b99e3537704f5c30eb9aa0f929f9b24c1fa42ceb585d4
6
+ metadata.gz: b7c81a90d29ed1e8e42b5a63057326ea2fad09bab74b2071a08b1d9ee799176627d77766866350559b7639d32cf9dcab4bb2c514e355eebac62febb6af758326
7
+ data.tar.gz: ab9a995e40bec7bce7d0bdae38f7d3bbd8d5dc83b3618d255011ee7e64e4a5f813d951bfa2e9e5c4f346e1b86d7de7743a105a78e0a7742b12d7ccc024f7fc12
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1 - 2026-11-14
4
+
5
+ - `config/ractorize.gemfile` caps prism below 2, added to the repo's own prism requirement or declared when it has none. A fresh resolve picks prism 2 now that minitest 6.1 no longer caps it, and refract 1.1.0 (which Phlex loads) references `Prism::MissingNode`, which prism 2 removed, so a Phlex app's ractorize job failed at boot with `NameError: uninitialized constant Prism::MissingNode`. The cap goes once refract releases yippee-fun/refract#4 (yippee-fun/refract#6).
6
+
3
7
  ## 0.5.0 - 2026-10-18
4
8
 
5
9
  - `conformance-audit --require` and `audit.require` take a gem or feature name as well as a path: an entry that is not written as a path (`./`, `../`, `~`, absolute) and names no existing file is required from the load path. The kit now audits any installed gem with no Gemfile change and no `.conformance.yml`: `gem install conformance-kit` then `conformance-audit --require loofah --namespace Loofah`. Existing paths resolve as before.
data/README.md CHANGED
@@ -405,8 +405,9 @@ With Active Record, it also needs a dumped schema cache (`db:schema:cache:dump`)
405
405
  - Rails main;
406
406
  - Rack main, for `rack/ractorize`;
407
407
  - Shopify's i18n branch, pinned to [Shopify/i18n#5](https://github.com/Shopify/i18n/pull/5) until that merges: without it, every render fails on `I18n.fallbacks`.
408
+ - prism below 2, until refract releases [yippee-fun/refract#4](https://github.com/yippee-fun/refract/pull/4): refract 1.1.0, which Phlex loads, references `Prism::MissingNode`, which prism 2 removed, so with prism 2 the app fails at boot.
408
409
 
409
- `config/ractorize.gemfile` swaps them into your Gemfile. It drops your own lines for those gems and Rails' component gems (Bundler refuses a gem declared twice) and keeps everything else. Copy it next to your Gemfile and bundle with it, as the workflow does; keep `Gemfile.ractorize` and its lock out of git.
410
+ `config/ractorize.gemfile` swaps them into your Gemfile. It drops your own lines for those gems and Rails' component gems (Bundler refuses a gem declared twice), adds the prism cap to your own prism requirement (or declares it), and keeps everything else. Copy it next to your Gemfile and bundle with it, as the workflow does; keep `Gemfile.ractorize` and its lock out of git.
410
411
 
411
412
  ```bash
412
413
  cp "$(bundle exec ruby -e 'print Gem.loaded_specs["conformance-kit"].full_gem_path')/config/ractorize.gemfile" Gemfile.ractorize
@@ -2,24 +2,45 @@
2
2
 
3
3
  # The ractorize job's bundle: the repo's own Gemfile, with Rails, Rack and i18n
4
4
  # swapped for the branches `Rails.application.ractorize!` needs until they ship
5
- # (Rails 8.2, Rack's rack/ractorize, ruby-i18n/i18n#741). Copy it next to the
6
- # repo's Gemfile as Gemfile.ractorize and run with BUNDLE_GEMFILE=Gemfile.ractorize.
5
+ # (Rails 8.2, Rack's rack/ractorize, ruby-i18n/i18n#741), and the caps below.
6
+ # Copy it next to the repo's Gemfile as Gemfile.ractorize and run with
7
+ # BUNDLE_GEMFILE=Gemfile.ractorize.
7
8
  ractorize_sources = {
8
9
  "rails" => { github: "rails/rails", branch: "main" },
9
10
  "rack" => { github: "rack/rack", branch: "main" },
10
11
  "i18n" => { github: "Shopify/i18n", ref: "refs/pull/5/head" }
11
12
  }.freeze
13
+ # Upper bounds a fresh resolve needs, added to the repo's own requirement for the gem.
14
+ # prism < 2: refract 1.1.0, which Phlex loads, references Prism::MissingNode, which
15
+ # prism 2 removed. Drop it once refract releases yippee-fun/refract#4 (yippee-fun/refract#6).
16
+ ractorize_caps = { "prism" => "< 2" }.freeze
12
17
  # Rails' own gems come from the same checkout as rails.
13
18
  replaced = %w[railties actionpack actionview activesupport activemodel activerecord activejob actionmailer
14
19
  actioncable activestorage actiontext actionmailbox] + ractorize_sources.keys
15
20
 
16
21
  # The repo's own lines for these gems are dropped: Bundler refuses a gem declared twice.
17
22
  reading_repo_gemfile = true
23
+ capped = []
18
24
  define_singleton_method(:gem) do |name, *args, **options, &block|
19
- super(name, *args, **options, &block) unless reading_repo_gemfile && replaced.include?(name)
25
+ next if reading_repo_gemfile && replaced.include?(name)
26
+
27
+ if (cap = ractorize_caps[name])
28
+ capped << name
29
+ # A gemspec's development dependency passes its options as a trailing Hash: the cap goes before it.
30
+ args = args.dup.insert(args.index { _1.is_a?(Hash) } || args.size, cap)
31
+ end
32
+ super(name, *args, **options, &block)
20
33
  end
21
34
 
22
35
  eval_gemfile File.expand_path("Gemfile", __dir__)
23
36
  reading_repo_gemfile = false
24
37
 
25
38
  ractorize_sources.each { |name, source| gem name, **source }
39
+ ractorize_caps.each do |name, cap|
40
+ next if capped.include?(name)
41
+
42
+ # Bundler 2.6.5+ adds a gemspec's development dependencies without calling +gem+: keep their requirement.
43
+ own = dependencies.find { _1.name == name }
44
+ requirement = own ? own.requirement.as_list - [">= 0"] : []
45
+ gem name, *requirement, cap
46
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConformanceKit
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conformance-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mhenrixon