Skip to content

Conversation

@jefferya
Copy link
Contributor

@jefferya jefferya commented Nov 6, 2025

No description provided.

Comment on lines +1 to +6
#!/usr/bin/env ruby
require_relative "../config/boot"
require "active_support/continuous_integration"

CI = ActiveSupport::ContinuousIntegration
require_relative "../config/ci.rb"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New feature in Rails 8, this file is the default added by rails app:update


def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
system(*args, exception: true) || abort("\n== Command #{args} failed ==")
Copy link
Contributor Author

@jefferya jefferya Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update and combined with existing.

Comment on lines -23 to -27
# Ensuring that ActiveStorage routes are loaded before Comfy's globbing
# route. Without this file serving routes are inaccessible.
config.railties_order = [ActiveStorage::Engine, :main_app, :all]
config.exceptions_app = routes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to make future runs of rails app:update easier.

Comment on lines +1 to +23
# Run using bin/ci

# frozen_string_literal: true

CI.run do
step "Setup", "bin/setup --skip-server"

step "Style: Ruby", "bin/rubocop"

step "Security: Importmap vulnerability audit", "bin/importmap audit"

step "Tests: Rails", "bin/rails test"
step "Tests: System", "bin/rails test:system"
step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"

# Optional: set a green GitHub commit status to unblock PR merge.
# Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`.
# if success?
# step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff"
# else
# failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
# end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update. This is the default generated file for the new Rails CI feature.

#
environment ENV.fetch("RAILS_ENV") { "development" }

# This configuration file will be evaluated by Puma. The top-level methods that
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update.

# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update

# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src style-src)
#
# # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update

# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
Rails.application.config.assets.paths << Rails.root.join("node_modules/bootstrap-icons/font")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update

# config.action_dispatch.show_exceptions = :rescuable
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
config.action_dispatch.show_exceptions = :rescuable
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update

config.action_view.annotate_rendered_view_with_filenames = true

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
Copy link
Contributor Author

@jefferya jefferya Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update and weaved in previous customizations.

#
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accepted suggestions by rails app:update and weaved in previous customizations.

@jefferya jefferya force-pushed the jefferya/880_rails_8.1 branch from 052e3a1 to b10f72e Compare November 7, 2025 17:27
#
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based off config/environments/production.rb with differences:

  • RAILS_LOG_LEVEL
  • report_deprecations
  • attributes_for_inspect

@jefferya jefferya changed the title [WIP] Update Rails to v8.1 Update Rails to v8.1 Nov 7, 2025
t.integer "page_id", null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["is_published"], name: "index_comfy_cms_translations_on_is_published"
t.index ["locale"], name: "index_comfy_cms_translations_on_locale"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails 8.1 db:schema:dump: columns are now sorted alphabetically by name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants