Saturday, September 10, 2016

This Week in Rails: Ruby 2.4 compat, attachments in preview emails, fixture_file_upload and more!

Posted by prathamesh

Howdy everyone!

This is Prathamesh bringing you the changes from this week in Rails!

This Week’s Rails Contributors

This week we had 22 awesome people making Rails better. We also had 3 people contributing for the first time. 

One more step towards Ruby 2.4 compatibility

Ruby 2.4 is coming! If you have already tried it with Rails 5, a key must be 32 bits error was raised due to a breaking change in Ruby 2.4 related to openssl cipher key lengths. It is now fixed, while keeping backward compatibility with any existing signed data. 🎉

Improved

Allow download of email attachments in the Mailer Previews

Now we can download email attachments in mailer previews similar to real-world emails thanks to this change.

Fixed

Make fixture_file_upload work in integration tests

This change makes sure that the  fixture_file_upload   test helper works properly in integration tests. In case you missed it, integration tests are the default way of testing controllers in Rails 5.

Use proper test adapter for Active Jobs inheriting from ApplicationJob

Rails 5 introduced ApplicationJob as the default base class for Active Job classes. When testing these classes, the proper test adapter was not being invoked due to looking for subclasses of ActiveJob::Base instead of its descendants. This change fixes it.

Wrapping Up

Although I enjoyed reviewing all the commits from the last week, there were as usual too many to mention exhaustively. But do check them out yourself here!   Until next week!