Skip to content

Commit

Permalink
Merge pull request #2335 from glowfic-constellation/upgrade/rails-8-0
Browse files Browse the repository at this point in the history
Upgrade to Rails 8
  • Loading branch information
Throne3d authored Dec 23, 2024
2 parents 093d9d3 + ab5ddd5 commit 870574f
Show file tree
Hide file tree
Showing 21 changed files with 743 additions and 444 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gem 'aws-sdk-ses', '~> 1'
gem 'barnes' # heroku ruby-specific metrics
gem 'bootstrap', '~> 5.3' # pin until major version is handled
gem 'dartsass-sprockets'
gem 'exception_notification'
gem 'exception_notification', git: 'https://github.com/Throne3d/exception_notification.git', ref: 'b2131cf'
gem 'get_process_mem'
gem 'gon', '~> 6.4'
gem 'haml-rails'
Expand All @@ -40,7 +40,7 @@ gem 'nokogiri'
gem 'pg', '~> 1.5'
gem 'pg_search'
gem 'rack-pratchett'
gem 'rails', '~> 7.2.2'
gem 'rails', '~> 8.0.1'
gem "redcarpet", "~> 3.6"
gem 'redis', '~> 5.3'
gem 'request_store', '~> 1.7'
Expand Down
147 changes: 77 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,66 +1,74 @@
GIT
remote: https://github.com/Throne3d/exception_notification.git
revision: b2131cfc5239d85d7e235512241af43cf1642555
ref: b2131cf
specs:
exception_notification (4.5.0)
actionmailer (>= 5.2, < 9)
activesupport (>= 5.2, < 9)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
actioncable (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
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)
actionmailbox (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.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)
actionmailer (8.0.1)
actionpack (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activesupport (= 8.0.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
actionpack (8.0.1)
actionview (= 8.0.1)
activesupport (= 8.0.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
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)
actiontext (8.0.1)
actionpack (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
actionview (8.0.1)
activesupport (= 8.0.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.2.1)
activesupport (= 7.2.2.1)
activejob (8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.3.6)
activemodel (7.2.2.1)
activesupport (= 7.2.2.1)
activerecord (7.2.2.1)
activemodel (= 7.2.2.1)
activesupport (= 7.2.2.1)
activemodel (8.0.1)
activesupport (= 8.0.1)
activerecord (8.0.1)
activemodel (= 8.0.1)
activesupport (= 8.0.1)
timeout (>= 0.4.0)
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)
activestorage (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activesupport (= 8.0.1)
marcel (~> 1.0)
activesupport (7.2.2.1)
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -72,6 +80,7 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
api-pagination (6.0.0)
Expand Down Expand Up @@ -159,12 +168,9 @@ GEM
docile (1.4.0)
dotenv (3.1.7)
drb (2.2.1)
erubi (1.13.0)
erubi (1.13.1)
ethon (0.16.0)
ffi (>= 1.15.0)
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
activesupport (>= 5.2, < 8)
execjs (2.9.1)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -230,7 +236,7 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
irb (1.14.2)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jmespath (1.6.2)
Expand All @@ -251,7 +257,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.2)
logger (1.6.4)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -272,7 +278,7 @@ GEM
bigdecimal (~> 3.1)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
net-imap (0.5.1)
net-imap (0.5.4)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -304,7 +310,7 @@ GEM
activesupport (>= 6.1)
popper_js (2.11.8)
power_assert (2.0.4)
psych (5.2.1)
psych (5.2.2)
date
stringio
public_suffix (6.0.1)
Expand All @@ -330,20 +336,20 @@ GEM
rack-timeout (0.7.0)
rackup (2.2.1)
rack (>= 3)
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)
rails (8.0.1)
actioncable (= 8.0.1)
actionmailbox (= 8.0.1)
actionmailer (= 8.0.1)
actionpack (= 8.0.1)
actiontext (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activemodel (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
bundler (>= 1.15.0)
railties (= 7.2.2.1)
railties (= 8.0.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -352,12 +358,12 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
rails-html-sanitizer (1.6.2)
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.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
railties (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -368,7 +374,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.8.1)
rdoc (6.10.0)
psych (>= 4.0.0)
redcarpet (3.6.0)
redis (5.3.0)
Expand All @@ -378,7 +384,7 @@ GEM
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.5.12)
reline (0.6.0)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
Expand Down Expand Up @@ -468,7 +474,7 @@ GEM
sass-embedded (~> 1.77)
scout_apm (5.4.0)
parser
securerandom (0.4.0)
securerandom (0.4.1)
seed_dump (3.3.1)
activerecord (>= 4)
activesupport (>= 4)
Expand Down Expand Up @@ -510,7 +516,7 @@ GEM
thor (1.3.2)
tilt (2.4.0)
timecop (0.9.10)
timeout (0.4.2)
timeout (0.4.3)
tinymce-rails (7.6.0)
railties (>= 3.1.1)
traceroute (0.8.1)
Expand All @@ -522,6 +528,7 @@ GEM
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)
useragent (0.16.11)
webmock (3.24.0)
addressable (>= 2.8.0)
Expand Down Expand Up @@ -561,7 +568,7 @@ DEPENDENCIES
dartsass-sprockets
database_cleaner
dotenv
exception_notification
exception_notification!
factory_bot_rails
get_process_mem
gon (~> 6.4)
Expand All @@ -587,7 +594,7 @@ DEPENDENCIES
rack-mini-profiler
rack-pratchett
rack-timeout (>= 0.6.0)
rails (~> 7.2.2)
rails (~> 8.0.1)
rails-controller-testing
rake (~> 13.2)
redcarpet (~> 3.6)
Expand Down
2 changes: 1 addition & 1 deletion app/concerns/presentable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

module Presents
def as_json(options={})
return super if options.delete(:without_presenter)
return super(options.except(:without_presenter)) if options[:without_presenter]
begin
presenter = (self.class.name + "Presenter").constantize
rescue NameError
Expand Down
2 changes: 2 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env ruby
exec './bin/rails', 'server', *ARGV
13 changes: 5 additions & 8 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'fileutils'

APP_ROOT = File.expand_path('..', __dir__)
APP_NAME = "glowfic"

def system!(*args)
system(*args, exception: true)
Expand All @@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# puts "\n== Copying sample files =="
Expand All @@ -28,10 +26,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'

puts "\n== Restarting application server =="
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"
unless ARGV.include?('--skip-server')
puts "\n== Starting development server =="
STDOUT.flush # flush the output before exec(2) so that it displays
exec 'bin/dev'
end
end
6 changes: 5 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def self.full(text)
end
end

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.2
Expand All @@ -62,7 +66,7 @@ class Application < Rails::Application
# 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.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w(assets tasks))
config.autoload_lib(ignore: %w[assets tasks])

# Configuration for the application, engines, and railties goes here.
#
Expand Down
Loading

0 comments on commit 870574f

Please sign in to comment.