factory_bot1
There’s a new version of factory_bot this week, as usual: 3.1.1 (aa81d2f).
Mark Rushakoff (mark-rushakoff) fixed a typo (4682ab0). Have I mentioned how much I love documentation fixes? Because I do.
Joshua Clayton (joshuaclayton) ensured that FactoryBot.attributes_for
works with has_many
associations (50be545).
He also refactored Strategies to be modules instead of classes, and added an Evaluation façade to make building strategies easier ([89d5e94](http://github.com/thoughtbot/factory_bot/commit/89d5e944d5aeeb29ff5feb34a94c5dccd0d0c796 “Refactor Strategies
This changes Strategy from a class to a module and removes inheritance. It introduces an Evaluation facade to make building strategies easier”)).
flutie
flutie got some love this week from Edwin Morris (ehmorris), who changed values from pixels to ems ([fd26ed0](http://github.com/thoughtbot/flutie/commit/fd26ed0406f74e8468c1ebacbc2ffa48f21679dc “Merge pull request #35 from ehmorris/master
Changed flutie pixel values to ems”)) and these new-fangled CSS3 “rems”. REMs are relative to the base element’s size, not to the parent’s size (more here). I wish I’d had that back in the day.
paperclip
paperclip got a bunch of bug fixes from Prem Sichanugrist (sikachu).
He fixed the contenttype validator to allow blanks and nils ([5eed1dc](http://github.com/thoughtbot/paperclip/commit/5eed1dcb785e8b42ea7881b1bd822394df6aa3a0 “Fix contenttype validator to support blank/nil
ContentTypeValidator now honors the :allow_nil
and :allow_blank
option.”)), ensured that code dealt with the content type, not the MimeType ([3f1d30f](http://github.com/thoughtbot/paperclip/commit/3f1d30fb61245b54227f1f997f93df963e89ddef “Call #content_type on MimeType object
This will ensure that the content type is a String.
Fixes #805”)), closed ALL the files ([4f6d482](http://github.com/thoughtbot/paperclip/commit/4f6d482d9823bdf14be5ef70248531fe1e3dc363 “Close ALL the files
Make sure that we close opened files after we”)), and removed unused code (yay!) ([02eb725](http://github.com/thoughtbot/paperclip/commit/02eb72593c0cc508d973af15eb455199ea8b05d0 “Remove unused code
AttachmentAdapter now handles this for us.”)).
Sebastien Guignot (sguignot) fixed attachment.reprocess!
when using Fog or S3
(9d1355b).
Kir Maximov (kir) fixed a problem with an incorrect content_type (3e98fc2).
shoulda-matchers
shoulda-matchers continues to improve. Gabe Berke-Williams (gabebw - that’s me!) added tests for Rails 3.2 (aff2824) and bumped rspec-rails (5baa056). As ever, the NEWS file is the place to watch for updates to functionality.
Aaron Gibralter (agibralter) fixed
the ensure_length_of
matcher to check for all possible I18n error
messages (0a8e652),
meaning our internationalized users aren’t left with false negatives in their
tests.
Victor Pereira (vpereira) added the
in_array
method (e40e2cb)
to the ensure_inclusion_of
matcher, meaning you can do
it { should ensure_inclusion_of(:attribute).in_array(%w[cat dog])
now.
Project name history can be found here.
-
Looking for FactoryGirl? The library was renamed in 2017. ↩