-
-
Notifications
You must be signed in to change notification settings - Fork 198
Update to Rails 7.2 #2343
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
Merged
+312
−200
Merged
Update to Rails 7.2 #2343
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/usr/bin/env ruby | ||
| require "rubygems" | ||
| require "bundler/setup" | ||
|
|
||
| # explicit rubocop config increases performance slightly while avoiding config confusion. | ||
| ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) | ||
|
|
||
| load Gem.bin_path("rubocop", "rubocop") |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,37 @@ | ||
| #!/usr/bin/env ruby | ||
| require "fileutils" | ||
|
|
||
| # path to your application root. | ||
| APP_ROOT = File.expand_path('..', __dir__) | ||
| APP_ROOT = File.expand_path("..", __dir__) | ||
| APP_NAME = "planner" | ||
|
|
||
| def system!(*args) | ||
| system(*args) || abort("\n== Command #{args} failed ==") | ||
| system(*args, exception: true) | ||
| end | ||
|
|
||
| FileUtils.chdir APP_ROOT do | ||
| # This script is a way to set up or update your development environment automatically. | ||
| # This script is idempotent, so that you can run it at any time and get an expectable outcome. | ||
| # Add necessary setup steps to this file. | ||
|
|
||
| puts '== Installing dependencies ==' | ||
| system! 'gem install bundler --conservative' | ||
| system('bundle check') || system!('bundle install') | ||
| puts "== Installing dependencies ==" | ||
| system! "gem install bundler --conservative" | ||
| system("bundle check") || system!("bundle install") | ||
|
|
||
| # puts "\n== Copying sample files ==" | ||
| # unless File.exist?('config/database.yml') | ||
| # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' | ||
| # unless File.exist?("config/database.yml") | ||
| # FileUtils.cp "config/database.yml.sample", "config/database.yml" | ||
| # end | ||
|
|
||
| puts "\n== Preparing database ==" | ||
| system! 'bin/rails db:prepare' | ||
| system! "bin/rails db:prepare" | ||
|
|
||
| puts "\n== Removing old logs and tempfiles ==" | ||
| system! 'bin/rails log:clear tmp:clear' | ||
| system! "bin/rails log:clear tmp:clear" | ||
|
|
||
| puts "\n== Restarting application server ==" | ||
| system! 'bin/rails restart' | ||
| system! "bin/rails restart" | ||
|
|
||
| # puts "\n== Configuring puma-dev ==" | ||
| # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" | ||
| # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" | ||
| end |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| development: | ||
| adapter: async | ||
|
|
||
| test: | ||
| adapter: test | ||
|
|
||
| production: | ||
| adapter: redis | ||
| url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> | ||
| channel_prefix: planner_production | ||
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have Heroku Cache currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right perhaps we also don't use Action Cable (websocket).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have the config then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly because it is automatically generated each time the upgrade dance is performed. Benefit: By having it, unused, there's less diff to manage when upgrading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it should at least contain a comment that it's currently not used.