diff --git a/Gemfile b/Gemfile index a02353a2cc..9e920af8e0 100644 --- a/Gemfile +++ b/Gemfile @@ -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" @@ -65,7 +65,6 @@ gem "pghero" # Cache gem "connection_pool" gem "redis" -gem "second_level_cache" # Setting gem "rails-settings-cached" diff --git a/Gemfile.lock b/Gemfile.lock index 9e3bc3bc17..a95ba44793 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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 @@ -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) @@ -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) @@ -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) @@ -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) @@ -536,7 +532,8 @@ 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) @@ -544,11 +541,11 @@ GEM 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 @@ -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 @@ -616,7 +613,6 @@ DEPENDENCIES ruby-push-notifications rucaptcha sass-rails - second_level_cache shakapacker (~> 7.2.1) sidekiq (< 8) sidekiq-cron @@ -629,4 +625,4 @@ DEPENDENCIES view_component (~> 2.83) BUNDLED WITH - 2.5.10 + 2.5.3 diff --git a/app/models/location.rb b/app/models/location.rb index 9799dc0cdc..29c143c0bc 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -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) } diff --git a/app/models/node.rb b/app/models/node.rb index 9fcbb0a2fa..b2a985718e 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 9e1e7d73d6..b6b09aa1f8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -17,8 +17,6 @@ class User < ApplicationRecord include User::Roles include User::RedisOnlineTrackable - second_level_cache version: 4, expires_in: 2.weeks - LOGIN_FORMAT = 'A-Za-z0-9\-\_\.' ALLOW_LOGIN_FORMAT_REGEXP = /\A[#{LOGIN_FORMAT}]+\z/ diff --git a/config/database.yml b/config/database.yml index 04bd308cba..52d32b66c7 100644 --- a/config/database.yml +++ b/config/database.yml @@ -10,6 +10,7 @@ development: host: localhost port: 54321 user: postgres + gssencmode: "disable" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index a7759987e0..e7f667901e 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -16,5 +16,3 @@ schedule_config = YAML.safe_load(ERB.new(File.read("config/schedule.yml")).result) Sidekiq::Cron::Job.load_from_hash(schedule_config) end - -SecondLevelCache.configure.cache_key_prefix = "slc:3" \ No newline at end of file