Skip to content

Commit

Permalink
rails app:update and reconcile differences manually
Browse files Browse the repository at this point in the history
  • Loading branch information
martinemde committed Dec 1, 2024
1 parent 97b1293 commit d74cfc1
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 23 deletions.
7 changes: 5 additions & 2 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# Enable server timing.
config.server_timing = true

# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
# Run rails dev:cache to toggle Action Controller caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
Expand Down Expand Up @@ -60,6 +60,9 @@
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true

# Append comments with runtime information tags to SQL queries in logs.
config.active_record.query_log_tags_enabled = true

# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true

Expand Down
28 changes: 12 additions & 16 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
# Code is not reloaded between requests.
config.enable_reloading = false

# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
# Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
config.eager_load = true

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
# Full error reports are disabled.
config.consider_all_requests_local = false

# Turn on fragment caching in view templates.
config.action_controller.perform_caching = true

# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
Expand Down Expand Up @@ -66,7 +65,10 @@
# want to log everything, set the level to "debug".
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")

# Use a different cache store in production.
# Don't log any deprecations.
config.active_support.report_deprecations = false

# Replace the default in-process memory cache store with a durable alternative.
# config.cache_store = :mem_cache_store

# Use a real queuing backend for Active Job (and separate queues per environment).
Expand All @@ -90,18 +92,12 @@
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true

# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

# Log disallowed deprecations.
config.active_support.disallowed_deprecation = :log

# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

# Only use :id for inspections in production.
config.active_record.attributes_for_inspect = [ :id ]

# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
# "example.com", # Allow requests from example.com
Expand Down
8 changes: 4 additions & 4 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
}

# Show full error reports and disable caching.
config.consider_all_requests_local = true
# Show full error reports.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :mem_cache_store

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = :none
# Render exception templates for rescuable exceptions and raise for other exceptions.
config.action_dispatch.show_exceptions = :rescuable

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
Expand Down
30 changes: 30 additions & 0 deletions config/initializers/new_framework_defaults_8_0.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Be sure to restart your server when you modify this file.
#
# This file eases your Rails 8.0 framework defaults upgrade.
#
# Uncomment each configuration one by one to switch to the new default.
# Once your application is ready to run with all new defaults, you can remove
# this file and set the `config.load_defaults` to `8.0`.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html

###
# Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves the timezone.
# If set to `:zone`, `to_time` methods will use the timezone of their receivers.
# If set to `:offset`, `to_time` methods will use the UTC offset.
# If `false`, `to_time` methods will convert to the local system UTC offset instead.
#++
# Rails.application.config.active_support.to_time_preserves_timezone = :zone

###
# When both `If-Modified-Since` and `If-None-Match` are provided by the client
# only consider `If-None-Match` as specified by RFC 7232 Section 6.
# If set to `false` both conditions need to be satisfied.
#++
# Rails.application.config.action_dispatch.strict_freshness = true

###
# Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
#++
# Regexp.timeout = 1
3 changes: 3 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
port ENV.fetch("PORT", 3000)

# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart

# Specifies the `environment` that Puma will run in.
environment rails_env

Expand Down
21 changes: 21 additions & 0 deletions public/400.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link href="/stylesheets/static.css" rel='stylesheet' type='text/css'>
<title>Client Error | RubyGems.org</title>
</head>
<body>
<div class="wrapper">
<div class="image__wrapper">
<img height="530" alt="400 error" src="/images/sea_level.svg">
</div>
<div class="content">
<h1>Client Error</h1>
<p>Please check the request and try again.</p>
<a href="/">Back to RubyGems.org →</a>
</div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion public/403.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<div class="wrapper">
<div class="image__wrapper">
<img height="530" alt="422 error" src="/images/sea_level.svg">
<img height="530" alt="403 error" src="/images/sea_level.svg">
</div>
<div class="content">
<h1>Forbidden.</h1>
Expand Down
21 changes: 21 additions & 0 deletions public/406-unsupported-browser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link href="/stylesheets/static.css" rel='stylesheet' type='text/css'>
<title>Browser Not Supported | RubyGems.org</title>
</head>
<body>
<div class="wrapper">
<div class="image__wrapper">
<img height="530" alt="403 error" src="/images/sea_level.svg">
</div>
<div class="content">
<h1>Browser Not Supported</h1>
<p>Please upgrade your browser to continue.</p>
<a href="/">Back to RubyGems.org →</a>
</div>
</div>
</body>
</html>

0 comments on commit d74cfc1

Please sign in to comment.