Skip to content

Commit

Permalink
Upgrade Rails 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Sep 27, 2024
1 parent 01e8079 commit f9e9439
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 101 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }

gem "jbuilder"
gem "rails", "~> 7.1.3"
gem "rails", "~> 8.0.0.beta1"
gem "rails_autolink"
gem "sass-rails"
gem "shakapacker", "~> 7.2.1"
Expand Down Expand Up @@ -65,7 +65,6 @@ gem "pghero"
# Cache
gem "connection_pool"
gem "redis"
gem "second_level_cache"

# Setting
gem "rails-settings-cached"
Expand Down
178 changes: 87 additions & 91 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,80 +3,77 @@ GEM
specs:
action-store (1.1.3)
rails (>= 5.2)
actioncable (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
actioncable (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
mail (>= 2.8.0)
actionmailer (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
actionview (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
actionpack (8.0.0.beta1)
actionview (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.4)
actionpack (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
useragent (~> 0.16)
actiontext (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
actionview (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
activejob (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
globalid (>= 0.3.6)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
activemodel (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
activerecord (8.0.0.beta1)
activemodel (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
timeout (>= 0.4.0)
activestorage (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activesupport (= 7.1.3.4)
activestorage (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
marcel (~> 1.0)
activesupport (7.1.3.4)
activesupport (8.0.0.beta1)
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
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
aliyun-sdk (0.8.0)
Expand All @@ -91,11 +88,12 @@ GEM
rb_sys (>= 0.9.54)
base64 (0.2.0)
bcrypt (3.1.20)
benchmark (0.3.0)
benchmark-ips (2.13.0)
bigdecimal (3.1.8)
bootsnap (1.18.3)
msgpack (~> 1.2)
builder (3.2.4)
builder (3.3.0)
byebug (11.1.3)
cancancan (3.6.1)
carrierwave (2.2.6)
Expand Down Expand Up @@ -123,7 +121,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.3.1)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
date (3.3.4)
Expand Down Expand Up @@ -160,7 +158,7 @@ GEM
drb (2.2.1)
enumize (0.2.1)
rails (>= 5.0.0)
erubi (1.12.0)
erubi (1.13.0)
et-orbi (1.2.11)
tzinfo
exception-track (1.3.0)
Expand Down Expand Up @@ -203,13 +201,13 @@ GEM
http-cookie (1.0.6)
domain_name (~> 0.5)
http_accept_language (2.1.1)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
io-console (0.7.2)
irb (1.13.1)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.12.0)
Expand Down Expand Up @@ -241,6 +239,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -258,7 +257,7 @@ GEM
mini_histogram (0.3.1)
mini_magick (4.12.0)
mini_mime (1.1.5)
minitest (5.23.1)
minitest (5.25.1)
minitest-spec-rails (7.2.0)
minitest (>= 5.0)
railties (>= 4.1)
Expand All @@ -267,10 +266,9 @@ GEM
msgpack (1.7.2)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-imap (0.4.12)
net-imap (0.4.16)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -281,9 +279,9 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.7.3)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
notifications (1.1.0)
kaminari (>= 0.15)
Expand Down Expand Up @@ -339,7 +337,7 @@ GEM
psych (5.1.2)
stringio
public_suffix (5.0.5)
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)
puma_worker_killer (0.3.1)
get_process_mem (~> 0.2)
Expand All @@ -349,8 +347,8 @@ GEM
rest-client (~> 2.0)
rexml (~> 3.2)
raabro (1.4.0)
racc (1.8.0)
rack (3.0.11)
racc (1.8.1)
rack (3.1.7)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (2.0.2)
Expand All @@ -367,20 +365,20 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.4)
actioncable (= 7.1.3.4)
actionmailbox (= 7.1.3.4)
actionmailer (= 7.1.3.4)
actionpack (= 7.1.3.4)
actiontext (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activemodel (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
rails (8.0.0.beta1)
actioncable (= 8.0.0.beta1)
actionmailbox (= 8.0.0.beta1)
actionmailer (= 8.0.0.beta1)
actionpack (= 8.0.0.beta1)
actiontext (= 8.0.0.beta1)
actionview (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activemodel (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
bundler (>= 1.15.0)
railties (= 7.1.3.4)
railties (= 8.0.0.beta1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -398,10 +396,10 @@ GEM
actionview (> 3.1)
activesupport (> 3.1)
railties (> 3.1)
railties (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
irb
railties (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand All @@ -421,7 +419,7 @@ GEM
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.8)
reline (0.5.10)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
Expand Down Expand Up @@ -476,9 +474,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
second_level_cache (2.7.1)
activerecord (>= 6.0)
activesupport (>= 6.0)
securerandom (0.3.1)
semantic_range (3.0.0)
shakapacker (7.2.3)
activesupport (>= 5.2)
Expand Down Expand Up @@ -521,9 +517,9 @@ GEM
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
stringio (3.1.0)
stringio (3.1.1)
strscan (3.1.0)
thor (1.3.1)
thor (1.3.2)
tilt (2.3.0)
timeout (0.4.1)
turbolinks (5.2.1)
Expand All @@ -536,19 +532,20 @@ GEM
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.5.0)
uri (0.13.0)
uri (0.13.1)
useragent (0.16.10)
version_gem (1.1.4)
view_component (2.83.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
warden (1.2.9)
rack (>= 2.0.9)
webrick (1.8.1)
webrick (1.8.2)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.15)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin-21
Expand Down Expand Up @@ -605,7 +602,7 @@ DEPENDENCIES
qiniu
rack-attack
rack-cors
rails (~> 7.1.3)
rails (~> 8.0.0.beta1)
rails-i18n
rails-settings-cached
rails_autolink
Expand All @@ -616,7 +613,6 @@ DEPENDENCIES
ruby-push-notifications
rucaptcha
sass-rails
second_level_cache
shakapacker (~> 7.2.1)
sidekiq (< 8)
sidekiq-cron
Expand All @@ -629,4 +625,4 @@ DEPENDENCIES
view_component (~> 2.83)

BUNDLED WITH
2.5.10
2.5.3
2 changes: 0 additions & 2 deletions app/models/location.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

class Location < ApplicationRecord
second_level_cache expires_in: 2.weeks

has_many :users

scope :hot, -> { order(users_count: :desc).where.not(users_count: 0) }
Expand Down
2 changes: 0 additions & 2 deletions app/models/node.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

class Node < ApplicationRecord
second_level_cache expires_in: 2.weeks

has_many :topics

validates :name, presence: true
Expand Down
Loading

0 comments on commit f9e9439

Please sign in to comment.