Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade rails to 5.0.7 #1777

Merged
merged 2 commits into from
Oct 31, 2018
Merged

upgrade rails to 5.0.7 #1777

merged 2 commits into from
Oct 31, 2018

Conversation

robbkidd
Copy link
Contributor

@robbkidd robbkidd commented Oct 29, 2018

Upgrade Rails to the latest point release of our current minor version.

Ran rake app:update and committed what changes it made via its templates as appropriate. Keeping these files looking as much like the Rails templates as possible makes reviewing future app:update diffs easier.

Changes of note:

  • config/environments/production.rb

Moved our logging configuration to the spots the Rails generators and app:update templates put them.

Added a new RAILS_LOG_TO_STDOUT environment variable to the list of env vars set in production to match the Railsy way to declare that.

  • config/initializers/cookies_serializer.rb

Changed to hybrid to "transparently migrate existing Marshal-serialized cookies to the new JSON-based format."

Also upgrade Factory{Girl|Bot} factory library in the test suite.

  • Because the latest is a good thing to have.
  • Because it's the right thing to do.
  • Because there will probably be some factory shenanigans with a Rails 5.0 to 5.1 upgrade.
  • Also moves factorybot and faker to the development & test group because they are sometimes handy in the development environment for cobbling up test data.
  • Also also alphabetized the test group because rubocop likes that.
  • Also also also, resolve deprecation warning about static attributes in factories.

@robbkidd robbkidd requested a review from a team October 29, 2018 14:02
Ran rake app:update and committed what changes it made via its templates
as appropriate. Keeping these files looking as much like the Rails
templates as possible makes reviewing future app:update diffs easier.

Changes of note:

* config/environments/production.rb

Moved our logging configuration to the spots the Rails generators and
app:update templates put them.

Added a new RAILS_LOG_TO_STDOUT environment variable to the list of env
vars set in production to match the Railsy way to declare that.

* config/initializers/cookies_serializer.rb

Changed to hybrid to "transparently migrate existing Marshal-serialized
cookies to the new JSON-based format."[1]

[1] https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer

Signed-off-by: Robb Kidd <rkidd@chef.io>
Because the latest is a good thing to have.

Because it's the right thing to do.

Because there will probably be some factory shenanigans with a Rails 5.0
to 5.1 upgrade.

Also moves factorybot and faker to the development & test group because
they are sometimes handy in the development environment for cobbling up
test data.

Also also alphabetized the test group because rubocop likes that.

Also also also, resolve deprecation warning about static attributes in
factories.

Signed-off-by: Robb Kidd <rkidd@chef.io>
Copy link
Contributor

@pwelch pwelch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@robbkidd robbkidd merged commit b64727c into master Oct 31, 2018
@chef-ci chef-ci deleted the robb/upgrade-rails branch October 31, 2018 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants