-
Notifications
You must be signed in to change notification settings - Fork 2
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 to Rails 7.2, switch to system specs, and add PWA and devcontainers support #1589
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MrSerth
added
enhancement
dependencies
Pull requests that update a dependency file
ruby
Pull requests that update Ruby code
docker
Pull requests that update Docker dependencies
devcontainers
Pull requests that update devcontainer dependencies
labels
Aug 16, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1589 +/- ##
==========================================
+ Coverage 94.77% 94.78% +0.01%
==========================================
Files 130 133 +3
Lines 3330 3338 +8
==========================================
+ Hits 3156 3164 +8
Misses 174 174 ☔ View full report in Codecov by Sentry. |
MrSerth
force-pushed
the
rails_72
branch
4 times, most recently
from
September 3, 2024 13:20
6008bdb
to
768f48b
Compare
MrSerth
force-pushed
the
rails_72
branch
3 times, most recently
from
September 12, 2024 10:35
ce75b90
to
339e445
Compare
MrSerth
force-pushed
the
rails_72
branch
2 times, most recently
from
September 25, 2024 17:25
3c3b549
to
cb770de
Compare
MrSerth
force-pushed
the
rails_72
branch
4 times, most recently
from
October 2, 2024 02:19
29adec3
to
4dc4c4d
Compare
* Use new syntax for enums * Fix usage of incorrect queue adapter for test environment * Adjust boilerplate code to match default for new Rails apps * Lint binstubs and remove outdated `yarn` stub
The prefix `~` was used to refer to a package in the `node_modules` folder and thus specify the search path. By today, this syntax is still supported, but unnecessary (the search path nowadays includes `node_modules`) and thus the usage is not recommended any longer.
For new Rails apps, brakeman is enabled by default
The docker image is not meant for local development, but for a production-level deployment. It is based on the Docker setup added by default for new Rails apps. As part of this change, we had to rethink our integration of JavaScript and CSS compressors. Without the change in `production.rb`, an ExecJS runtime would be needed to run the Rails app. Since we require a JavaScript runtime only for the asset compilation (but not when serving the application), this would bloat the Docker image unnecessarily.
For new Rails apps, a suitable webmanifest is added by default
Further, this commit also configures custom groups for SimpleCov, enriching the report generated with further details.
Previously, select2 was only loaded successfully, if first the page was loaded (turbolinks:load) and then all select2 locales (select2:locales:loaded). However, if the order was different, select2 wouldn't be initialized. Fixes #1476
System tests are natively supported by Rails and come with nice features, such as automatic screenshots in case of failures. Since a few years already, Rspec recommends system specs over feature specs.
…aner With the previous change to system specs and the new framework defaults, we can drop the database cleaner entirely. All tests will only be executed as part of a transaction, and nothing is stored in the database.
For new Rails apps, a suitable devcontainer is enabled by default. The setup provided has been tested and confirmed to work with a singe click in Visual Studio Code.
GitHub Codespaces is a commercial offering for devcontainers. While our setup mostly works out-of-the-box, the host and port forwarding required further adjustments to work as expected.
Otherwise, only the `id` is shown by default (in contrast to `full_inspect`). This behavior has changed with Rails 7.2, and previously showed all information by default. Since we often use `inspect` within the application to get details about unexpected errors, we want to keep the previous behavior.
Dome-GER
approved these changes
Oct 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
devcontainers
Pull requests that update devcontainer dependencies
docker
Pull requests that update Docker dependencies
enhancement
ruby
Pull requests that update Ruby code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, we are upgrading CodeHarbor to Rails 7.2 and making use of all the great features the new version provides. Therefore, this PR looks rather big at a first glance, but the commits are intended to provide a meaningful grouping of the changes. All commits are required to complete the upgrade and the activation of current best-practices for Rails application.
From a high-level point of view, the following changes are relevant:
secrets.yml
, require setting environment variableSECRET_KEY_BASE
for productionScreenshots of enhanced PWA support
Shortcuts with native app experience:
Screenshots of GitHub Codespaces running CodeHarbor
Codespaces Editor:
Remote Access:
List of commits
Specifically, this PR adds the following commits:
other
nil