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 fd30a75 commit d02eb2c
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 93 deletions.
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
module Gemcutter
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
config.load_defaults 8.0

# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
Expand Down
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: 5 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
"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.
# Render exception templates for rescuable exceptions and raise for other exceptions.
# config.action_dispatch.show_exceptions = :rescuable
# Using this setting seems broken in rails 8.0, causing the debug template to render in system tests.
config.action_dispatch.show_exceptions = :none

# Disable request forgery protection in test environment.
Expand Down
70 changes: 0 additions & 70 deletions config/initializers/new_framework_defaults_7_2.rb

This file was deleted.

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 d02eb2c

Please sign in to comment.