Saturday, February 17, 2018

Rails 5.1.5, parallel testing and more!

Posted by repinel

Hello everyone! This is Roque bringing you the latest news from the Rails world.

Rails 5.1.5 released 🎉

Release 5.1.5 is out, but you can still help the community by testing 5.2.0.rc1 to ensure it is solid.

This Week’s Contributors

26 people contributed to Rails the past week! If you’d like to join them, why not check out the list of open issues?

On writing software well: pilot episode

This is first of a serie of episodes recently released by DHH. Check out the full list on YouTube.

Parallel testing

In Rails 6.0.0, new application will run tests in parallel by default. The number of parallel workers is customizable, and which one will have its own temporary database. I recommend reading the awesome pull request description. Good job!

Custom serializers for Active Job arguments

This brings more flexibility on how arguments are passed to jobs. Arguments can be serialized using a simple interface described here.

Add #create_or_find_by

This is similar to #find_or_create_by, but avoids querying the table first before attempting to insert a row. The new approach relies on unique constraints to try inserting a row first, and selecting later. This is very helpful to high throughput application that could have data changes between a SELECT and a INSERT.

Add support for connection pooling on Redis cache store

This will keep the number of Redis connections under control.

That’s it for this week. Many more changes were introduced to Rails than were featured here, check out the full week of commit activity to learn more!

Until next time!