From b51401b774bcb1e858a4409fb712daecdd4ccc4c Mon Sep 17 00:00:00 2001 From: Aaron Manaloto Date: Tue, 28 Jun 2022 17:32:46 +0800 Subject: [PATCH] Bump ruby to 3.1.2 and update required gems --- .ruby-version | 2 +- Gemfile | 11 +++-- Gemfile.lock | 56 +++++++++++++++++--------- config/initializers/z_03_setup_mail.rb | 2 +- 4 files changed, 47 insertions(+), 24 deletions(-) diff --git a/.ruby-version b/.ruby-version index 37c2961c2..ef538c281 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.2 +3.1.2 diff --git a/Gemfile b/Gemfile index d168094fe..9bf2525b7 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.7.2' +ruby '3.1.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.1.5.1' @@ -33,7 +33,7 @@ gem 'jbuilder', '~> 2.7' # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb -gem 'bootsnap', '>= 1.4.4', require: false +gem 'bootsnap', '>= 1.12.0', require: false # ---------------------------------------------------- Dradis Community Edition gem 'bootstrap', '~> 4.3.1' @@ -43,7 +43,7 @@ gem 'jquery-fileupload-rails', '~> 0.3.4' gem 'jquery-hotkeys-rails' # Organize Node tree -gem 'acts_as_tree', '~> 2.7.1' +gem 'acts_as_tree', '~> 2.9.1' gem 'builder' @@ -130,6 +130,9 @@ gem 'warden', '~> 1.2.3' # Schedule cron jobs gem 'whenever', require: false +gem 'net-smtp' +gem 'net-pop' +gem 'net-imap' # ------------------------------------------------------------------ Deployment @@ -138,7 +141,7 @@ gem 'whenever', require: false group :production do # Use Unicorn as the web server - gem 'unicorn', '5.4.1' + gem 'unicorn', '6.1.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 0d560f8b9..41147231d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,7 +67,7 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - acts_as_tree (2.7.1) + acts_as_tree (2.9.1) activerecord (>= 3.0.0) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) @@ -77,8 +77,8 @@ GEM bcrypt (3.1.12) bindex (0.8.1) blankslate (3.1.3) - bootsnap (1.4.5) - msgpack (~> 1.0) + bootsnap (1.12.0) + msgpack (~> 1.2) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) @@ -117,6 +117,7 @@ GEM database_cleaner (1.8.2) diff-lcs (1.4.4) differ (0.1.2) + digest (3.1.0) dradis-acunetix (4.4.0) dradis-plugins (~> 4.0) nokogiri (~> 1.3) @@ -236,7 +237,7 @@ GEM activerecord kaminari-core (= 1.2.1) kaminari-core (1.2.1) - kgio (2.11.3) + kgio (2.11.4) launchy (2.4.3) addressable (~> 2.3) letter_opener (1.7.0) @@ -261,13 +262,27 @@ GEM mini_portile2 (2.8.0) mini_racer (0.6.2) libv8-node (~> 16.10.0.0) - minitest (5.15.0) + minitest (5.16.1) mono_logger (1.1.1) - msgpack (1.3.3) + msgpack (1.5.2) multi_json (1.15.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nenv (0.3.0) + net-imap (0.2.3) + digest + net-protocol + strscan + net-pop (0.1.1) + digest + net-protocol + timeout + net-protocol (0.1.3) + timeout + net-smtp (0.3.1) + digest + net-protocol + timeout nio4r (2.5.8) nokogiri (1.13.6) mini_portile2 (~> 2.8.0) @@ -334,15 +349,15 @@ GEM rake (>= 12.2) thor (~> 1.0) rainbow (3.0.0) - raindrops (0.19.1) + raindrops (0.20.0) rake (13.0.6) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) record_tag_helper (1.0.1) actionview (>= 5) - redis (4.3.1) - redis-namespace (1.8.1) + redis (4.7.0) + redis-namespace (1.8.2) redis (>= 3.0.4) regexp_parser (2.1.1) request_store (1.5.0) @@ -435,9 +450,11 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.4.2) - thor (1.0.1) + strscan (3.0.3) + thor (1.2.1) tilt (2.0.10) timecop (0.9.1) + timeout (0.2.0) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) @@ -446,7 +463,7 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.0.0) - unicorn (5.4.1) + unicorn (6.1.0) kgio (~> 2.6) raindrops (~> 0.7) vegas (0.1.11) @@ -469,7 +486,7 @@ GEM chronic (>= 0.6.3) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.4) + zeitwerk (2.6.0) PLATFORMS ruby @@ -478,9 +495,9 @@ PLATFORMS DEPENDENCIES RedCloth (~> 4.3.2) - acts_as_tree (~> 2.7.1) + acts_as_tree (~> 2.9.1) bcrypt (= 3.1.12) - bootsnap (>= 1.4.4) + bootsnap (>= 1.12.0) bootstrap (~> 4.3.1) brakeman builder @@ -531,6 +548,9 @@ DEPENDENCIES listen (~> 3.3) local_time (>= 2.0.0) mini_racer + net-imap + net-pop + net-smtp nokogiri (= 1.13.6) paper_trail (~> 12.0.0) parslet (~> 1.6.0) @@ -555,18 +575,18 @@ DEPENDENCIES sinatra (= 2.2.0) spring sqlite3 - thor (~> 1.0.1) + thor (~> 1.2.1) timecop turbolinks (~> 5) uglifier (>= 1.3.0) - unicorn (= 5.4.1) + unicorn (= 6.1.0) warden (~> 1.2.3) web-console (>= 4.1.0) webdrivers whenever RUBY VERSION - ruby 2.7.2p137 + ruby 3.1.2p20 BUNDLED WITH - 2.2.8 + 2.3.16 diff --git a/config/initializers/z_03_setup_mail.rb b/config/initializers/z_03_setup_mail.rb index 4bb4a7d23..20d82f03a 100644 --- a/config/initializers/z_03_setup_mail.rb +++ b/config/initializers/z_03_setup_mail.rb @@ -5,7 +5,7 @@ config_path = Rails.root.join('config/smtp.yml') if File.exist?(config_path) - config = YAML.load_file(config_path)[Rails.env] + config = YAML.unsafe_load_file(config_path)[Rails.env] ActionMailer::Base.asset_host = ActionMailer::Base.default_url_options[:host] if Rails.env.production? ActionMailer::Base.default_options = config['default_options'].symbolize_keys