Skip to content

Update factory_bot to 6.2.1 - #50912

Merged
Hamms merged 20 commits into
stagingfrom
factory_bot-6.2.1
Apr 25, 2023
Merged

Update factory_bot to 6.2.1#50912
Hamms merged 20 commits into
stagingfrom
factory_bot-6.2.1

Conversation

@Hamms

@Hamms Hamms commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

The very latest version of the library, now that we can do so; follow-up to #50768. Specifically target a version >= 6.2.0 to pick up support for Ruby 3.0, in preparation for an eventual update to that version.

The main breaking change which affects us in this transition is the change to the default build strategy for associated records; most of the necessary updates for that have already been applied (PR1, PR2), there's just one more in this PR which could've been included in the others but which slipped through the cracks.

Some other changes that affect us include the deprecation of static attributes in favor of dynamic attributes (PR), and the removal of allow_class_lookup now that it's no longer necessary (implemented in this PR). Changes that don't affect us mostly involve removal of support for old versions of Ruby and Rails and the deprecation of functionality that we aren't using.

We could alternatively update first to 5.x as an intermediary before updating to 6.x, but there isn't a specific need to.

Links

Testing story

Relying on existing tests to verify that this update to a test library does not break anything.

Hamms added 3 commits March 22, 2023 16:16
The very latest version of the library, now that we can do so; follow-up to #50768. Specifically target a version `>= 6.2.0` to pick up support for Ruby 3.0, in preparation for an eventual update to that version: https://github.com/thoughtbot/factory_bot/releases/tag/v6.2.0
Specifically target the latest 5.x version as a transitional step toward v6.2, which adds support for Ruby 3.

Breaking changes in v5:

- Removed support for EOL versions of Ruby and Rails
- Removed static attributes (use dynamic attributes with a block instead)
- Removed looking up factories by class
- Removed ignore method (use transient instead)
- Removed duplicate_attribute_assignment_from_initialize_with configuration option

https://github.com/thoughtbot/factory_bot/releases/tag/v5.0.0
@Hamms
Hamms marked this pull request as ready for review April 21, 2023 01:10
@Hamms
Hamms requested review from a team April 21, 2023 01:10
@Hamms
Hamms merged commit 1f79797 into staging Apr 25, 2023
@Hamms
Hamms deleted the factory_bot-6.2.1 branch April 25, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants