From 91e2d0e4d225b3080759f6f5ee3e7426abbac182 Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Tue, 9 Apr 2024 14:51:02 +0200 Subject: [PATCH] rails 7.1 upgrade --- .github/workflows/deploy.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 2 +- Gemfile | 12 +- Gemfile.lock | 318 ++++++++++++++++++++-------------- bin/setup | 2 +- bin/update | 2 +- config/application.rb | 2 +- vendor/docker/webapp.conf | 2 + 9 files changed, 201 insertions(+), 143 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 53b6f1da..eac4fff4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,7 +34,7 @@ jobs: - name: Install run: | cp .env.build .env - gem install bundler -v 2.4.20 + gem install bundler -v 2.5.6 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Lint and Test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5aa5418..59da9d40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Install run: | cp .env.build .env - gem install bundler -v 2.4.20 + gem install bundler -v 2.5.6 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Lint and Test diff --git a/Dockerfile b/Dockerfile index 75323aeb..4ab184aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ RUN mkdir -p vendor/bundle && \ chown -R app:app . && \ chmod -R 755 . && \ gem update --system 3.4.22 && \ - gem install bundler -v 2.4.20 && \ + gem install bundler -v 2.5.6 && \ /sbin/setuser app bundle install --path vendor/bundle # enable SSH diff --git a/Gemfile b/Gemfile index 6178a192..6eb88b04 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem "active_model_serializers", "~> 0.10.0" gem "api-pagination" gem "aws-sdk-sqs", "~> 1.3" gem "bcrypt", "~> 3.1.7" -gem "bolognese", "~> 2.1.0" +gem "bolognese", "~> 2.2" gem "bootsnap", "~> 1.2", ">= 1.2.1" gem "cancancan", "~> 2.0" gem "countries", "~> 2.1", ">= 2.1.2" @@ -23,14 +23,14 @@ gem "kaminari", "~> 1.0", ">= 1.0.1" gem "lograge", "~> 0.11.2" gem "logstash-event", "~> 1.2", ">= 1.2.02" gem "logstash-logger", "~> 0.26.1" -gem "maremma", "~> 4.9.6" -gem "nokogiri", "~> 1.13.2" +gem "maremma", "~> 5.0" +gem "nokogiri", "~> 1.16", ">= 1.16.3" gem "oj", ">= 2.8.3" gem "oj_mimic_json", "~> 1.0", ">= 1.0.1" gem "rack-cors", "~> 1.0", require: "rack/cors" gem "rack-utf8_sanitizer", "~> 1.6" -gem "rails", "6.1.7.3" -gem "sentry-raven", "~> 2.9" +gem "rails", "~> 7.1", ">= 7.1.3.2" +gem "sentry-raven", "~> 3.1", ">= 3.1.2" gem "shoryuken", "~> 4.0" gem "simple_command" gem "slack-notifier", "~> 2.3", ">= 2.3.2" @@ -48,7 +48,7 @@ group :development, :test do end group :development do - gem "listen", ">= 3.0.5", "< 3.2" + gem "listen", "~> 3.9" gem "spring" gem "spring-watcher-listen", "~> 2.0.0" end diff --git a/Gemfile.lock b/Gemfile.lock index 497e6f20..1714c8f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,70 +1,85 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + actioncable (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + zeitwerk (~> 2.6) + actionmailbox (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + net-imap + net-pop + net-smtp + actionmailer (7.1.3.2) + actionpack (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activesupport (= 7.1.3.2) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) - rack (~> 2.0, >= 2.0.9) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.3.2) + actionview (= 7.1.3.2) + activesupport (= 7.1.3.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3.2) + actionpack (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_model_serializers (0.10.13) - actionpack (>= 4.1, < 7.1) - activemodel (>= 4.1, < 7.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + active_model_serializers (0.10.14) + actionpack (>= 4.1) + activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (7.1.3.2) + activesupport (= 7.1.3.2) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) + activemodel (7.1.3.2) + activesupport (= 7.1.3.2) + activerecord (7.1.3.2) + activemodel (= 7.1.3.2) + activesupport (= 7.1.3.2) + timeout (>= 0.4.0) + activestorage (7.1.3.2) + actionpack (= 7.1.3.2) + activejob (= 7.1.3.2) + activerecord (= 7.1.3.2) + activesupport (= 7.1.3.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (7.1.3.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) api-pagination (4.8.2) @@ -81,6 +96,8 @@ GEM aws-sigv4 (~> 1.1) aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) + base64 (0.2.0) + bcp47_spec (0.2.1) bcrypt (3.1.16) benchmark_methods (0.7) better_errors (2.9.1) @@ -90,7 +107,8 @@ GEM bibtex-ruby (6.1.0) latex-decode (~> 0.0) racc (~> 1.7) - bolognese (2.1.0) + bigdecimal (3.1.7) + bolognese (2.2.0) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) @@ -105,9 +123,9 @@ GEM json-ld-preloaded (~> 3.1, >= 3.1.3) jsonlint (~> 0.3.0) loofah (~> 2.0, >= 2.0.3) - maremma (>= 4.9.4, < 5) + maremma (~> 5.0) namae (~> 1.0) - nokogiri (>= 1.13.2, < 1.14) + nokogiri (~> 1.16, >= 1.16.2) oj (~> 3.10) oj_mimic_json (~> 1.0, >= 1.0.1) postrank-uri (~> 1.0, >= 1.0.18) @@ -140,6 +158,7 @@ GEM coderay (1.1.3) colorize (0.8.1) concurrent-ruby (1.1.10) + connection_pool (2.4.1) countries (2.1.4) i18n_data (~> 0.8.0) money (~> 6.9) @@ -161,17 +180,18 @@ GEM diff-lcs (1.5.1) docile (1.4.0) dotenv (2.7.6) - ebnf (2.3.5) + drb (2.2.1) + ebnf (2.5.0) htmlentities (~> 4.3) - rdf (~> 3.2) + rdf (~> 3.3) scanf (~> 1.0) - sxp (~> 1.2) + sxp (~> 2.0) unicode-types (~> 1.8) edtf (3.1.1) activesupport (>= 3.0, < 8.0) equivalent-xml (0.6.0) nokogiri (>= 1.4.3) - erubi (1.10.0) + erubi (1.12.0) excon (0.71.1) facets (3.1.0) factory_bot (4.11.1) @@ -181,16 +201,26 @@ GEM railties (>= 3.0.0) faker (2.22.0) i18n (>= 1.8.11, < 2) - faraday (0.17.6) - multipart-post (>= 1.2, < 3) + faraday (2.9.0) + faraday-net_http (>= 2.0, < 3.2) faraday-encoding (0.0.5) faraday - faraday_middleware (0.14.0) - faraday (>= 0.7.4, < 1.0) + faraday-excon (2.1.0) + excon (>= 0.27.4) + faraday (~> 2.0) + faraday-follow_redirects (0.3.0) + faraday (>= 1, < 3) + faraday-gzip (0.1.0) + faraday (>= 1.0) + zlib (~> 2.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (3.1.0) + net-http faraday_middleware-aws-sigv4 (0.3.0) aws-sigv4 (~> 1.0) faraday (>= 0.15) - ffi (1.15.5) + ffi (1.16.3) gender_detector (0.1.2) unicode_utils (>= 1.3.0) git (1.10.2) @@ -202,6 +232,10 @@ GEM i18n (1.10.0) concurrent-ruby (~> 1.0) i18n_data (0.8.0) + io-console (0.7.2) + irb (1.12.0) + rdoc + reline (>= 0.4.2) iso8601 (0.9.1) jmespath (1.5.0) json (2.6.1) @@ -235,9 +269,9 @@ GEM kaminari-core (1.2.2) latex-decode (0.4.0) link_header (0.0.8) - listen (3.0.8) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -246,28 +280,30 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - loofah (2.13.0) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) - maremma (4.9.8) + marcel (1.0.4) + maremma (5.0.0) activesupport (>= 4.2.5) addressable (>= 2.3.6) builder (~> 3.2, >= 3.2.2) excon (~> 0.71.0) - faraday (~> 0.17.3) - faraday-encoding (~> 0.0.4) - faraday_middleware (~> 0.14.0) - nokogiri (>= 1.11.2, < 1.14.0) + faraday (>= 2.0) + faraday-encoding (~> 0.0.5) + faraday-excon (~> 2.1.0) + faraday-follow_redirects (~> 0.3.0) + faraday-gzip (~> 0.1.0) + faraday-multipart (~> 1.0.4) + nokogiri (~> 1.16, >= 1.16.2) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) matrix (0.4.2) - method_source (1.0.0) mini_mime (1.1.2) mini_portile2 (2.8.5) minitest (5.15.0) @@ -276,22 +312,25 @@ GEM msgpack (1.4.4) multi_json (1.15.0) multipart-post (2.1.1) + mutex_m (0.2.0) namae (1.2.0) racc (~> 1.7) - net-imap (0.3.7) + net-http (0.4.1) + uri + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.5.0) net-protocol next_rails (1.3.0) colorize (>= 0.8.1) - nio4r (2.5.9) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + nio4r (2.7.1) + nokogiri (1.16.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) oj (3.13.11) oj_mimic_json (1.0.1) @@ -304,61 +343,78 @@ GEM addressable (>= 2.4.0) nokogiri (>= 1.8.0) public_suffix (>= 2.0.0, < 2.1) + psych (5.1.2) + stringio public_suffix (2.0.5) racc (1.7.3) - rack (2.2.3) + rack (2.2.9) rack-cors (1.1.1) rack (>= 2.0.0) - rack-test (1.1.0) - rack (>= 1.0, < 3) + rack-session (1.0.2) + rack (< 3) + rack-test (2.1.0) + rack (>= 1.3) rack-utf8_sanitizer (1.7.0) rack (>= 1.0, < 3.0) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.3.2) + actioncable (= 7.1.3.2) + actionmailbox (= 7.1.3.2) + actionmailer (= 7.1.3.2) + actionpack (= 7.1.3.2) + actiontext (= 7.1.3.2) + actionview (= 7.1.3.2) + activejob (= 7.1.3.2) + activemodel (= 7.1.3.2) + activerecord (= 7.1.3.2) + activestorage (= 7.1.3.2) + activesupport (= 7.1.3.2) bundler (>= 1.15.0) - railties (= 6.1.7.3) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.1.3.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) - method_source + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.3.2) + actionpack (= 7.1.3.2) + activesupport (= 7.1.3.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.0.6) - rb-fsevent (0.11.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - rdf (3.2.11) + rdf (3.3.1) + bcp47_spec (~> 0.2) link_header (~> 0.0, >= 0.0.8) - rdf-rdfxml (3.2.2) - builder (~> 3.2) + rdf-rdfxml (3.3.0) + builder (~> 3.2, >= 3.2.4) htmlentities (~> 4.3) - rdf (~> 3.2) - rdf-xsd (~> 3.2) - rdf-turtle (3.2.1) - ebnf (~> 2.3) - rdf (~> 3.2) - rdf-xsd (3.2.1) - rdf (~> 3.2) + rdf (~> 3.3) + rdf-xsd (~> 3.3) + rdf-turtle (3.3.1) + base64 (~> 0.2) + bigdecimal (~> 3.1, >= 3.1.5) + ebnf (~> 2.5) + rdf (~> 3.3) + rdf-xsd (3.3.0) + rdf (~> 3.3) rexml (~> 3.2) + rdoc (6.6.3.1) + psych (>= 4.0.0) regexp_parser (2.2.0) + reline (0.5.0) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) rexml (3.2.5) @@ -401,8 +457,8 @@ GEM rubocop (>= 0.87.0) ruby-progressbar (1.13.0) scanf (1.0.0) - sentry-raven (2.13.0) - faraday (>= 0.7.6, < 1.0) + sentry-raven (3.1.2) + faraday (>= 1.0) shoryuken (4.0.3) aws-sdk-core (>= 2) concurrent-ruby @@ -427,31 +483,31 @@ GEM sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) - sxp (1.2.4) + stringio (3.1.0) + sxp (2.0.0) matrix (~> 0.4) - rdf (~> 3.2) - thor (1.2.1) + rdf (~> 3.3) + thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) unicode-types (1.9.0) unicode_utils (1.4.0) + uri (0.13.0) vcr (6.2.0) webmock (3.14.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.8.1) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.12) + zlib (2.1.1) PLATFORMS ruby @@ -462,7 +518,7 @@ DEPENDENCIES aws-sdk-sqs (~> 1.3) bcrypt (~> 3.1.7) better_errors - bolognese (~> 2.1.0) + bolognese (~> 2.2) bootsnap (~> 1.2, >= 1.2.1) byebug cancancan (~> 2.0) @@ -482,24 +538,24 @@ DEPENDENCIES json-canonicalization (= 0.3.1) jwt kaminari (~> 1.0, >= 1.0.1) - listen (>= 3.0.5, < 3.2) + listen (~> 3.9) lograge (~> 0.11.2) logstash-event (~> 1.2, >= 1.2.02) logstash-logger (~> 0.26.1) - maremma (~> 4.9.6) + maremma (~> 5.0) next_rails - nokogiri (~> 1.13.2) + nokogiri (~> 1.16, >= 1.16.3) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) rack-cors (~> 1.0) rack-utf8_sanitizer (~> 1.6) - rails (= 6.1.7.3) + rails (~> 7.1, >= 7.1.3.2) rspec-rails (~> 6.1, >= 6.1.1) rubocop (~> 1.3, >= 1.3.1) rubocop-performance (~> 1.5, >= 1.5.1) rubocop-rails (~> 2.8, >= 2.8.1) rubocop-rspec (~> 1.28) - sentry-raven (~> 2.9) + sentry-raven (~> 3.1, >= 3.1.2) shoryuken (~> 4.0) shoulda-matchers (~> 4.1, >= 4.1.2) simple_command @@ -512,4 +568,4 @@ DEPENDENCIES webmock (~> 3.1) BUNDLED WITH - 2.4.20 \ No newline at end of file + 2.5.6 \ No newline at end of file diff --git a/bin/setup b/bin/setup index 4528d72c..f1a66599 100755 --- a/bin/setup +++ b/bin/setup @@ -15,7 +15,7 @@ chdir APP_ROOT do # Add necessary setup steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler -v 2.4.20 --conservative" + system! "gem install bundler -v 2.5.6 --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" diff --git a/bin/update b/bin/update index 084f8f8a..c3eb787c 100755 --- a/bin/update +++ b/bin/update @@ -15,7 +15,7 @@ chdir APP_ROOT do # Add necessary update steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler -v 2.4.20 --conservative" + system! "gem install bundler -v 2.5.6 --conservative" system("bundle check") || system!("bundle install") puts "\n== Updating database ==" diff --git a/config/application.rb b/config/application.rb index a8e35818..ed1c1934 100644 --- a/config/application.rb +++ b/config/application.rb @@ -48,7 +48,7 @@ module Levriero class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.1 + config.load_defaults 7.1 # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/vendor/docker/webapp.conf b/vendor/docker/webapp.conf index fb67ac2a..81bc5a48 100644 --- a/vendor/docker/webapp.conf +++ b/vendor/docker/webapp.conf @@ -6,5 +6,7 @@ server { passenger_enabled on; passenger_user app; passenger_ruby /usr/bin/ruby; + passenger_preload_bundler on; + merge_slashes off; }