Saturday, February 25, 2017

This Week in Rails: 5.1.0.beta1 release, Encrypted Secrets, System Tests and more!

Posted by gregmolnar

Hi everyone,

Greg here with the latest from the world of Rails. It was a busy week with new releases and many improvements!

New Rails releases

The first beta release for 5.1.0 is out with some love towards JavaScript, System Tests, Encrypted Secrets and more!
There is also a new stable release for 4.2.8 and a release candidate for 5.0.2

Eileen joins Rails core

We’re proud to welcome Eileen M. Uchitelle to Rails core!

This week’s Rails Contributors

33 developers contributed to Rails this week. If you want to be part of this team, look at the issues list and make a contribution!

New

Custom url helpers and polymorphic mapping

This pull request introduces support for custom url helpers and defining custom polymorphic mappings in routes.rb

Capybara Integration with Rails (AKA System Tests)

Rails has a built in integration with Capybara now which makes writing system tests easier, since all the setup is handled by Rails. For more details read the write-up on the pull request.

Encrypted secrets support

Rails introduces secrets encryption which is inspired by the Sekrets gem.
It worth noting here that, some improvements to the crypto is on the way too.

Improved

Include JobID in all Active Job info logs

Earlier the JobID wasn’t logged when a job started or ended performing, but that’s not the case anymore, making debugging of job related issues easier.

From now on ActiveSupport::Gzip.decompress checks the CRC in the gzip footer.

Allow 3-level configs to group database connections by environment

If you have multiple database connection per environment, you can group your config by the environment. Check this comment for an example.

Delegate to scope rather than merge! for collection proxy

A performance improvement by not using merge! when it is not necessary.

Fixed

Preload to_datetime before freezing a TimeWithZone instance

After freezing an ActiveSupport::TimeWithZone instance, it is not possible to call to_datetime because the value is cached in an instance variable. To avoid this issue, the instance variable is preloaded before the freeze occurs.

HashWithIndifferentAccess#compat nil issue fix

HashWithIndifferentAccess#compact returned nil earlier when the hash didn’t contain nil values in it. This PR fixed the problem.

Deprecated

Deprecate using quoted_id in quoting / type casting

Originally quoted_id was used in legacy quoting mechanism. Now we use type casting mechanism for that hence quoted_id is deprecated.

That’s it from This Week in Rails. There were many other great contributions, too numerous to list here, but feel free to check them out

Until next week 👣