feat: v2.0.0 — drop Virtus, modernize gem for Rails 8#1
Merged
Conversation
- Replace abandoned Virtus library with custom Rectify::Attributable module backed by plain Ruby (no external dep), supporting typed attributes, type coercion, nested forms, and array-of-form attributes - Add Rectify::AttributeDefinition replacing Virtus::Attribute introspection - Add Rectify::Context (struct-like) replacing OpenStruct for form context - Remove eval() in Command#evaluate — use block.binding.receiver instead - Update FormAttribute, BuildFormFromModel, FormatAttributesHash to use new attribute_set API - Fix DatabaseReporter SQL_TO_IGNORE to exclude sqlite_version() query emitted by Rails 8 SQLite adapter on first connection - Remove virtus (~> 2.0) and its stale transitive deps (axiom-types, coercible, descendants_tracker) from gemspec - Bump version to 2.0.0 - All 114 specs pass, rubocop clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
axiom-types,coercible,descendants_tracker) — replaced with a customRectify::Attributablemodule that uses plain Ruby with zero new dependencieseval()inCommand#evaluatewithblock.binding.receiver(Ruby 2.6+) — safer, no security smellOpenStructfor form context with a lightweightRectify::ContextclassDatabaseReporternow ignoressqlite_version()queries emitted by Rails 8 on first connection, which previously broke the query-count specWhat
Rectify::Attributableprovidesattribute :name, String— typed scalar attributes with coercion (Integer, Float, String, Symbol)attribute :address, AddressForm— nested form coercion from Hashattribute :contacts, [ContactForm]— array of typed/form objectsattribute :colours, Array— untyped array pass-throughattribute :email— untyped attribute (no coercion)attribute_setintrospection (used byBuildFormFromModel,FormatAttributesHash)dupTest plan
bundle exec rubocop— no offensesbundle installresolves without VirtusInstall after merge
🤖 Generated with Claude Code