Saturday, March 4, 2017

This Week in Rails: 5.0.2 released, stronger Encrypted Secrets and more

Posted by claudio


It’s Claudio from sunny Los Angeles bringing you the latest news from the world of Ruby on Rails. So many improvements this week so… let’s get to it!

Rails 5.0.2 has been released!

Go on and update your Rails 5 app to the latest release!
v5.0.2 is fully backward-compatible with v5.0.1 and v5.0.0.

Google Summer of Code 2017

We’re very happy to announce that Ruby on Rails has been accepted as an organization for the Google Summer of Code (GSoC) 2017 edition!


Update secrets to use modern crypto

As announced last week, Rails 5.1 will include encrypted secrets. Thanks to this PR, the secrets will use a stronger cryptographic algorithm for enhanced security.


Add iso8601 and rfc3339 parsing to timezones

ActiveSupport::TimeZone now has a new rfc3339 method to get an RFC 3339 timestamp in a specific time zone.

Use webpacker 1.0 in new applications

In case you missed it, rails/webpacker is out of beta development and has recently released v1.0.


Only load SystemTestCase if Puma is defined

System test cases (Capybara) are one of the new features in Rails 5.1. Since they only support Puma, they are skipped if Puma is not present.

Do not evaluate :if arguments when :on is not satisfied for transaction callbacks

Understanding when callbacks are run can be tricky. This PR smartly avoids running them as soon as one of the preconditions is not met.

Update DateTime#change to support usec and nsec

If you need to change a timestamp by a matter of microseconds and nanoseconds, now you can do it!


Soft-deprecate the HashWithIndifferentAccess constant

If you use HashWithIndifferentAccess in your code, you might want to look at using ActiveSupport::HashWithIndifferentAccess  instead.

Deprecate implicit coercion of ActiveSupport::Duration

A snippet of code like 2 * will display a warning, inviting you not to coerce a Duration into a Numeric since it can be confusing, because adding/subtracting a value from a date treats integers as a day and not a second.

There were many other great pull requests this week from 35 contributors, including 12 first-timers. Thank you all!

Outside of code changes, we had many more good news this week.

Until next week!