Skip to content

Commit

Permalink
upgrade rails 7.1 -> 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
senid231 committed Jan 19, 2025
1 parent 47c24fe commit 5bb6ca7
Show file tree
Hide file tree
Showing 12 changed files with 332 additions and 137 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'pg'
gem 'pg_advisory_lock', git: 'https://github.com/didww/pg_advisory_lock.git'
gem 'pg_sql_caller', git: 'https://github.com/didww/pg_sql_caller.git'
gem 'rack', ' ~> 2.2.6'
gem 'rails', '~> 7.1.0'
gem 'rails', '~> 7.2.0'
gem 'responders'

# Authentication
Expand Down Expand Up @@ -52,7 +52,7 @@ gem 'jsonapi-resources', '~> 0.9.12'
# Ext
gem 'validates_timeliness', '~> 7.0.0.beta1'

# Object oriented authorization for Rails applications
# Object-oriented authorization for Rails applications
gem 'pundit'

gem 'paper_trail'
Expand Down
146 changes: 70 additions & 76 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,51 +96,46 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
actioncable (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
actionmailer (7.2.2.1)
actionpack (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
useragent (~> 0.16)
actiontext (7.2.2.1)
actionpack (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
Expand All @@ -156,8 +151,8 @@ GEM
active_admin_sidebar (1.1.0)
activeadmin
active_admin_theme (1.1.2)
active_record_extended (3.2.1)
activerecord (>= 5.2, < 7.2.0)
active_record_extended (3.3.0)
activerecord (>= 5.2, < 8.0.0)
pg (< 3.0)
activeadmin (3.2.2)
arbre (~> 1.2, >= 1.2.1)
Expand All @@ -169,46 +164,45 @@ GEM
kaminari (>= 1.2.1)
railties (>= 6.1)
ransack (>= 4.0)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
activejob (7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.3.6)
activeldap (5.1.1)
activemodel (> 4.0.0)
builder
gettext
gettext_i18n_rails
locale
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activemodel (7.2.2.1)
activesupport (= 7.2.2.1)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.2.2.1)
activemodel (= 7.2.2.1)
activesupport (= 7.2.2.1)
timeout (>= 0.4.0)
activerecord-import (2.0.0)
activerecord (>= 4.2)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
activestorage (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activesupport (= 7.2.2.1)
marcel (~> 1.0)
activesupport (7.1.5.1)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.2.0)
Expand Down Expand Up @@ -288,10 +282,10 @@ GEM
activerecord (>= 3.2)
date (3.3.3)
deep_merge (1.2.1)
delayed_job (4.1.11)
activesupport (>= 3.0, < 8.0)
delayed_job_active_record (4.1.7)
activerecord (>= 3.0, < 8.0)
delayed_job (4.1.13)
activesupport (>= 3.0, < 9.0)
delayed_job_active_record (4.1.11)
activerecord (>= 3.0, < 9.0)
delayed_job (>= 3.0, < 5)
devise (4.9.4)
bcrypt (~> 3.0)
Expand Down Expand Up @@ -451,7 +445,6 @@ GEM
msgpack (1.7.2)
multi_xml (0.6.0)
mustache (1.1.1)
mutex_m (0.3.0)
net-imap (0.3.6)
date
net-protocol
Expand Down Expand Up @@ -697,38 +690,38 @@ GEM
rackup (1.0.1)
rack (< 3)
webrick
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
rails (7.2.2.1)
actioncable (= 7.2.2.1)
actionmailbox (= 7.2.2.1)
actionmailer (= 7.2.2.1)
actionpack (= 7.2.2.1)
actiontext (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activemodel (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
bundler (>= 1.15.0)
railties (= 7.1.5.1)
railties (= 7.2.2.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
railties (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.0.6)
ransack (4.1.1)
ransack (4.2.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
Expand Down Expand Up @@ -858,6 +851,7 @@ GEM
unicode (0.4.4.5)
unicode-display_width (2.4.2)
uniform_notifier (1.16.0)
useragent (0.16.11)
validates_timeliness (7.0.0.beta2)
activemodel (>= 7.0.0, < 8)
timeliness (>= 0.3.10, < 1)
Expand Down Expand Up @@ -956,7 +950,7 @@ DEPENDENCIES
puma_worker_killer
pundit
rack (~> 2.2.6)
rails (~> 7.1.0)
rails (~> 7.2.0)
rails-html-sanitizer (>= 1.6.1)
ransack
responders
Expand Down Expand Up @@ -988,4 +982,4 @@ DEPENDENCIES
zip-zip

BUNDLED WITH
2.6.2
2.6.3
6 changes: 4 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
module Yeti
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
config.load_defaults 7.2

# changing defaults
Rails.application.config.action_view.default_enforce_utf8 = true
config.action_view.default_enforce_utf8 = true

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
Expand Down Expand Up @@ -86,11 +86,13 @@ class Application < Rails::Application
}

config.active_job.queue_adapter = :delayed_job
config.active_job.enqueue_after_transaction_commit = :never

# Use RSpec for testing
config.generators do |g|
g.test_framework :rspec
g.integration_tool :rspec
g.system_tests nil
end

# reimplementing minimal Rails.application.secrets, that was removed in Rails 7.2
Expand Down
14 changes: 8 additions & 6 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Show full error reports.
config.consider_all_requests_local = true

# Enable server timing
# Enable server timing.
config.server_timing = true

# Enable/disable caching. By default caching is disabled.
Expand All @@ -26,9 +26,7 @@
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

Expand All @@ -38,8 +36,12 @@
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
config.action_mailer.perform_caching = false

config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

Expand Down Expand Up @@ -70,9 +72,9 @@
# config.i18n.raise_on_missing_translations = true

# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
config.action_view.annotate_rendered_view_with_filenames = true

# Raise error when a before_action's only/except options reference missing actions
# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true

if ENV['RAILS_LOG_TO_STDOUT'].present?
Expand Down
5 changes: 5 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "yeti_production"

# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
config.action_mailer.perform_caching = false

# Ignore bad email addresses and do not raise email delivery errors.
Expand All @@ -91,6 +93,9 @@

config.use_schema_cache_dump = true

# 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
Loading

0 comments on commit 5bb6ca7

Please sign in to comment.