Repository navigation
Fix flex-column validation errors on ActiveModel 6.1+; make the specs run on Ruby 3.2 - #5
Merged
Merged
Conversation
…ix specs on Ruby 3 ActiveModel::Errors#each yields an error object instead of a name and a message on ActiveModel 6.1+, so errors from a flex column ended up on the model under an attribute name built from the error object's inspect string. The specs also needed updating for Ruby 3: lambdas used as blocks are strict about arity, and expectations on a trailing options hash must pass it explicitly rather than as keyword arguments. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drop the Ruby 1.8-era dependency pins and conditionals (bundler 1.x, rake < 11, rspec 2), add .ruby-version, remove the Travis configuration, pin json < 3 and the ActiveRecord 6-only test pins (sqlite3 1.x, concurrent-ruby < 1.3.5), and document how to run the specs. Bump the version to 1.0.13. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
Update: the specs were also run against PostgreSQL 16 (the
Ruby 3.2.8. SQLite and MySQL: 328 examples, 0 failures, 1 pending. PostgreSQL: 329 examples, 0 failures, 1 pending (one extra example runs on PostgreSQL). The pending example was already in the suite. 🤖 Generated with Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Starts throwaway MySQL and PostgreSQL containers on random local ports (SQLite runs in memory), runs the specs for each ActiveRecord version and prints a summary table. The spec helper can now read its database configuration from the path in FLEX_COLUMNS_SPEC_DATABASE_CONFIG_FILE, so a developer's own spec_database_config.rb is left alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Runs script/test-docker for SQLite, MySQL and PostgreSQL against ActiveRecord 6.1 and 7.2 on Ruby 3.2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replaces the 2.x-era Travis matrix with the Ruby/ActiveRecord pairs that work today. The ActiveRecord-version-dependent test pins now use a real version comparison, so ActiveRecord 7.0 is covered too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…very database Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ruby 1.8.7 through 2.6 and JRuby 1.7 (the former Travis matrix) can no longer be tested and are no longer supported; the gemspec now enforces the floor. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
Update since the PR was opened (the description above still says 1.0.13, which is now outdated):
🤖 Generated with Claude Code |
zed-0xff
approved these changes
Oct 12, 2026
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.
Problem
FlexColumns::Contents::FlexColumnContentsBase#before_validation!iteratederrors.each do |name, message|. On ActiveModel 6.1+eachyields an error object, so validation errors from a flex column were copied onto the model under an attribute name built from the error object'sinspectstring (for exampleuser_attributes.#<ActiveModel::Error:0x...>).Changes
errors.each, and fix the specs for Ruby 3 (lambda arity, options hash vs. keyword arguments in mock expectations)..ruby-version, remove the Travis configuration, requirejson < 3(ActiveSupport 7.x passesquirks_mode, which json 3 removed), add ActiveRecord 6-only test pins, document how to run the specs, bump to 1.0.13.Testing
328 examples, 0 failures (1 pending, already present), on Ruby 3.2.8 with ActiveRecord 7.2.3.2 and 6.1.7.10, each against SQLite and MySQL.
🤖 Generated with Claude Code