-
Couldn't load subscription status.
- Fork 7
Upgrade: cleanup before the storm + Rails 4.2.11.3 (latest patch release) #1511
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
Conversation
|
I added some backward compatible changes (ApplicationRecord, ApplicationJob, rename That should good to merge. Now I'll try upgrading to Rails 5, following the fixes and gem version locks that @ftarulla did 🤞 |
9df29f0 to
981d5c4
Compare
|
This is an awesome cleanup! ❤️ I'm wondering why the upgrade to 4.2.11 failed in #1472. Maybe it was really caused by one of the removed dependencies. |
|
The error that popped in CI was the same: the RSpec version was incompatible with Rake that got updated by Bundler for an unknown reason. Maybe you then tried more upgrades? I chose to merely downgraded Rake back to its previous version, because there was no reason for Bundler to upgrade Rake in the first place. |
981d5c4 to
31bccc3
Compare
ae7d4ec to
e7accfc
Compare
This removes around 10 direct dependencies, and a bunch more dependencies. I checked each and every removed dependency, and I couldn't find any single use of them left. Unit and integration specs are still passing, and the app still boots. I also removed shoulda because we only used a single rspec matcher (validate_presence_of) and there was only 5 occurrences of it.
It's only used in a few controllers, so the induced pattern is quite odd compared to the whole application. We can replace the gem with a few methods. One less dependency for less hidden magic.
This is to understand where and what tests are missing in the application, to have a global understanding of the test quality of the application. As of this commit the overall coverage is 80%, which looks great, but looking more closely we see that 9 controllers are 0% hence totally untested, and 6 controllers are below 70% coverage.
556ca1c to
d8580bd
Compare
Removes a dozen unused gems, and removes the
decent_exposuregem that wasn't used much. This is less gems to worry about during the upgrade. There are probably more gems that aren't used much that we could remove. For example RestClient is used for a single HTTP call!I also tried to group gems into categories (databases, models, views, assets, ...).
Also adds support for code coverage (on demand) using simplecov to understand what features are missing tests, as well as where to focus QA for the upgrade process. We have a good average (80%) but we also have lots of fully untested or under tested controllers, which decreases the overall confidence in the upgrade.
refs #1235