Upgrading factory_bot_rails 5 to 6
Breaking5.2.0 → 6.5.1Platform4New3Changed11Fixed2Other30
Fetching 10 releases from GitHub…7 / 10
BreakingUpgrade verdict
4 platform requirement changes.
In plain terms
- The gem now needs Ruby 3.1 or later to install and run.
- This version no longer works on Ruby 3.0, so you need a newer Ruby to upgrade.
- The package now declares which Ruby versions it requires, so installers can check compatibility.
- This version requires Ruby 3.0 or newer and Rails 6.1 or newer.
Must act Top 3 of 4 that need code or config changes
Ruby requirement changed in 6.5.1: >= 0 → >= 3.1.0.
What you must change
Platform4
Updates required_ruby_version to require Ruby 3.1 or newer.
required_ruby_versionDrops support for Ruby 3.0.
Adds the missing required Ruby version to the gemspec.
Supports Ruby 3.0+ and Rails 6.1+.
API changes
Generated by DepDelta from published Ruby source. Not mixed with prose notes.
- added:
const FactoryBotRails.VERSION
- added:
class AuthenticationGenerator < ModelGenerator - added:
class FixedAttribute < Struct.new(:name, :default) - added:
method Base.factory_name()
- changed:
constructor Reloader(_, _) → constructor Reloader(_) - added:
class FactoryValidator - added:
constructor FactoryValidator(_ = …) - added:
method FactoryValidator.add_validator(_) - added:
method FactoryValidator.run() - added:
module FileFixtureSupport
- changed:
constructor NullGenerator(_) → constructor NullGenerator(*)