From 4b4f31ab0200a33f576575965bb564b40dc2f246 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Thu, 17 Oct 2024 15:38:51 +0530 Subject: [PATCH 01/12] Updated bolognese version --- Gemfile | 8 +-- Gemfile.lock | 175 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 112 insertions(+), 71 deletions(-) diff --git a/Gemfile b/Gemfile index 7475f29..d64e603 100644 --- a/Gemfile +++ b/Gemfile @@ -9,15 +9,15 @@ gem "oj_mimic_json", "~> 1.0", ">= 1.0.1" gem "equivalent-xml", "~> 0.6.0" gem "nokogiri", ">= 1.10.4" gem "iso8601", "~> 0.9.0" -gem "bolognese", "~> 2.0.3" -gem "maremma", "~> 4.9.8" -gem "faraday", "~> 0.17.6" +gem "bolognese", "~> 2.2", git: "https://github.com/datacite/bolognese.git", branch: "schema-4.6" #change to 2.3 when released +gem "maremma", ">= 4.9.8" +gem "faraday", ">= 2.0", "< 3.0.0" gem "base32-url", "~> 0.5" gem "dalli", "~> 2.7.6" gem "lograge", "~> 0.11.2" gem "logstash-event", "~> 1.2", ">= 1.2.02" gem "logstash-logger", "~> 0.26.1" -gem "sentry-raven", "~> 2.9" +gem "sentry-raven", "~> 3.1", ">= 3.1.2" gem "jwt", "~> 1.5", ">= 1.5.4" gem "cancancan", "~> 2.0" gem "tzinfo-data", "~> 1.2017", ">= 1.2017.3" diff --git a/Gemfile.lock b/Gemfile.lock index d2c6039..06bc462 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,33 @@ +GIT + remote: https://github.com/datacite/bolognese.git + revision: 47f4562f7ccdee9949b1ef5290cf774a1c814c26 + branch: schema-4.6 + specs: + bolognese (2.2.0) + activesupport (>= 4.2.5) + benchmark_methods (~> 0.7) + bibtex-ruby (>= 5.1.0) + builder (~> 3.2, >= 3.2.2) + citeproc-ruby (~> 1.1, >= 1.1.12) + colorize (~> 0.8.1) + concurrent-ruby (~> 1.1, >= 1.1.5) + csl-styles (~> 1.0, >= 1.0.1.10) + edtf (~> 3.0, >= 3.0.4) + gender_detector (~> 0.1.2) + iso8601 (~> 0.9.1) + json-ld-preloaded (~> 3.1, >= 3.1.3) + jsonlint (~> 0.3.0) + loofah (~> 2.0, >= 2.0.3) + maremma (~> 5.0) + namae (~> 1.0) + nokogiri (~> 1.16, >= 1.16.2) + oj (~> 3.10) + oj_mimic_json (~> 1.0, >= 1.0.1) + postrank-uri (~> 1.0, >= 1.0.18) + rdf-rdfxml (~> 3.1) + rdf-turtle (~> 3.1) + thor (>= 0.19) + GEM remote: https://rubygems.org/ specs: @@ -46,40 +76,21 @@ GEM public_suffix (>= 2.0.2, < 5.0) arel (9.0.0) ast (2.4.2) - base32-url (0.5) + base32-url (0.7.0) + uuidtools (~> 2.1, >= 2.1.5) + base64 (0.2.0) + bcp47_spec (0.2.1) benchmark_methods (0.7) better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) - bibtex-ruby (6.0.0) + bibtex-ruby (6.1.0) latex-decode (~> 0.0) + racc (~> 1.7) + bigdecimal (3.1.8) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bolognese (2.0.3) - activesupport (>= 4.2.5) - benchmark_methods (~> 0.7) - bibtex-ruby (>= 5.1.0) - builder (~> 3.2, >= 3.2.2) - citeproc-ruby (~> 1.1, >= 1.1.12) - colorize (~> 0.8.1) - concurrent-ruby (~> 1.1, >= 1.1.5) - csl-styles (~> 1.0, >= 1.0.1.10) - edtf (~> 3.0, >= 3.0.4) - gender_detector (~> 0.1.2) - iso8601 (~> 0.9.1) - json-ld-preloaded (~> 3.1, >= 3.1.3) - jsonlint (~> 0.3.0) - loofah (~> 2.0, >= 2.0.3) - maremma (>= 4.9.4, < 5) - namae (~> 1.0) - nokogiri (>= 1.13.2, < 1.14) - oj (~> 3.10) - oj_mimic_json (~> 1.0, >= 1.0.1) - postrank-uri (~> 1.0, >= 1.0.18) - rdf-rdfxml (~> 3.1) - rdf-turtle (~> 3.1) - thor (>= 0.19) bootsnap (1.7.7) msgpack (~> 1.0) builder (3.2.4) @@ -116,11 +127,11 @@ GEM diff-lcs (1.4.4) docile (1.1.5) dotenv (2.7.6) - ebnf (2.3.5) + 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) @@ -128,12 +139,24 @@ GEM nokogiri (>= 1.4.3) erubi (1.10.0) excon (0.71.1) - faraday (0.17.6) - multipart-post (>= 1.2, < 3) + faraday (2.12.0) + faraday-net_http (>= 2.0, < 3.4) + json + logger 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.3.0) + net-http ffi (1.15.5) gender_detector (0.1.2) unicode_utils (>= 1.3.0) @@ -147,17 +170,18 @@ GEM iso8601 (0.9.1) jaro_winkler (1.5.6) json (2.5.1) - json-canonicalization (0.3.1) - json-ld (3.2.5) + json-canonicalization (1.0.0) + json-ld (3.3.2) htmlentities (~> 4.3) - json-canonicalization (~> 0.3, >= 0.3.2) + json-canonicalization (~> 1.0) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.15) rack (>= 2.2, < 4) - rdf (~> 3.2, >= 3.2.10) - json-ld-preloaded (3.2.2) - json-ld (~> 3.2) - rdf (~> 3.2) + rdf (~> 3.3) + rexml (~> 3.2) + json-ld-preloaded (3.3.0) + json-ld (~> 3.3) + rdf (~> 3.3) jsonlint (0.3.0) oj (~> 3) optimist (~> 3) @@ -167,6 +191,7 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) + logger (1.6.1) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -181,15 +206,18 @@ GEM mail (2.7.1) mini_mime (>= 0.1.1) marcel (1.0.2) - maremma (4.9.8) + 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) @@ -198,10 +226,15 @@ GEM minitest (5.14.4) msgpack (1.4.5) multi_json (1.15.0) - multipart-post (2.3.0) - namae (1.1.1) + multipart-post (2.4.1) + namae (1.2.0) + racc (~> 1.7) + net-http (0.4.1) + uri nio4r (2.5.9) - nokogiri (1.13.10-x86_64-linux) + nokogiri (1.16.7-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) oj (3.11.8) oj_mimic_json (1.0.1) @@ -252,18 +285,22 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - rdf (3.2.11) + rdf (3.3.2) + bcp47_spec (~> 0.2) + bigdecimal (~> 3.1, >= 3.1.5) 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) regexp_parser (2.1.1) request_store (1.5.1) @@ -301,8 +338,8 @@ GEM rubocop (>= 0.72.0) ruby-progressbar (1.11.0) scanf (1.0.0) - sentry-raven (2.13.0) - faraday (>= 0.7.6, < 1.0) + sentry-raven (3.1.2) + faraday (>= 1.0) simplecov (0.13.0) docile (~> 1.1.0) json (>= 1.8, < 3) @@ -319,9 +356,9 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sxp (1.2.4) + sxp (2.0.0) matrix (~> 0.4) - rdf (~> 3.2) + rdf (~> 3.3) thor (1.1.0) thread_safe (0.3.6) tzinfo (1.2.11) @@ -329,8 +366,10 @@ GEM tzinfo-data (1.2021.5) tzinfo (>= 1.0.0) unicode-display_width (1.6.1) - unicode-types (1.9.0) + unicode-types (1.10.0) unicode_utils (1.4.0) + uri (0.13.1) + uuidtools (2.2.0) vcr (3.0.3) webmock (1.20.4) addressable (>= 2.3.6) @@ -340,15 +379,17 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) + zlib (2.1.1) PLATFORMS + arm64-darwin-23 x86_64-linux DEPENDENCIES base32-url (~> 0.5) better_errors binding_of_caller - bolognese (~> 2.0.3) + bolognese (~> 2.2)! bootsnap (>= 1.1.0) byebug cancancan (~> 2.0) @@ -357,7 +398,7 @@ DEPENDENCIES dalli (~> 2.7.6) dotenv equivalent-xml (~> 0.6.0) - faraday (~> 0.17.6) + faraday (>= 2.0, < 3.0.0) git (~> 1.5) iso8601 (~> 0.9.0) jwt (~> 1.5, >= 1.5.4) @@ -365,7 +406,7 @@ DEPENDENCIES lograge (~> 0.11.2) logstash-event (~> 1.2, >= 1.2.02) logstash-logger (~> 0.26.1) - maremma (~> 4.9.8) + maremma (>= 4.9.8) nokogiri (>= 1.10.4) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) @@ -376,7 +417,7 @@ DEPENDENCIES rubocop (~> 0.77.0) rubocop-performance (~> 1.5, >= 1.5.1) rubocop-rails (~> 2.4) - sentry-raven (~> 2.9) + sentry-raven (~> 3.1, >= 3.1.2) simplecov spring spring-watcher-listen (~> 2.0.0) From c77402496a7f3a81f63fdc0a73dd9cf2b4e46058 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Thu, 17 Oct 2024 16:13:48 +0530 Subject: [PATCH 02/12] Fixed ruby version --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..b532f3d --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.4 \ No newline at end of file From ff884e054e1424d708ade82b630e995d5ebe5716 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 10:15:11 +0530 Subject: [PATCH 03/12] Update the Ruby and Phusion passenger version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7cf5b6..663f08b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/passenger-full:2.1.0 +FROM phusion/passenger-full:2.5.1 LABEL maintainer="mfenner@datacite.org" # Set correct environment variables. @@ -12,7 +12,7 @@ RUN usermod -a -G docker_env app CMD ["/sbin/my_init"] # Use Ruby 2.6.9 -RUN bash -lc 'rvm --default use ruby-2.6.9' +RUN bash -lc 'rvm --default use ruby-3.1.4' # Update installed APT packages RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \ From b464d7ddcf636fa54b844484b08a4cdfb2e7d983 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 10:18:37 +0530 Subject: [PATCH 04/12] Updated bundler version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 663f08b..ce38cfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN usermod -a -G docker_env app # Use baseimage-docker's init process. CMD ["/sbin/my_init"] -# Use Ruby 2.6.9 +# Use Ruby 3.1.4 RUN bash -lc 'rvm --default use ruby-3.1.4' # Update installed APT packages @@ -44,7 +44,7 @@ RUN mkdir -p /home/app/webapp/vendor/bundle && \ # Install Ruby gems WORKDIR /home/app/webapp -RUN gem install bundler && \ +RUN gem install bundler:2.5.6 && \ /sbin/setuser app bundle install --path vendor/bundle # Run additional scripts during container startup (i.e. not at build time) From 49718589c63207ceccc80ce48b4c469f08f93ee9 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 10:21:04 +0530 Subject: [PATCH 05/12] Update bundler --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ce38cfc..e303385 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN mkdir -p /home/app/webapp/vendor/bundle && \ # Install Ruby gems WORKDIR /home/app/webapp -RUN gem install bundler:2.5.6 && \ +RUN gem install bundler:2.4.22 && \ /sbin/setuser app bundle install --path vendor/bundle # Run additional scripts during container startup (i.e. not at build time) From 36f4ae3ab1747e9dd7f849e8ef955af52ad12a0e Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 11:41:29 +0530 Subject: [PATCH 06/12] Upgrade rails version --- Dockerfile | 3 +- Gemfile | 2 +- Gemfile.lock | 221 +++++++++++++++++++++++++++++++++------------------ 3 files changed, 145 insertions(+), 81 deletions(-) diff --git a/Dockerfile b/Dockerfile index e303385..eea92c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,8 @@ RUN mkdir -p /home/app/webapp/vendor/bundle && \ # Install Ruby gems WORKDIR /home/app/webapp -RUN gem install bundler:2.4.22 && \ +RUN gem install rubygems-update -v 3.5.6 && \ + gem install bundler:2.5.6 && \ /sbin/setuser app bundle install --path vendor/bundle # Run additional scripts during container startup (i.e. not at build time) diff --git a/Gemfile b/Gemfile index d64e603..6035672 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rails", "~> 5.2" +gem "rails", "~> 7.1", ">= 7.1.3" gem "dotenv" gem "oj", ">= 2.8.3" gem "oj_mimic_json", "~> 1.0", ">= 1.0.1" diff --git a/Gemfile.lock b/Gemfile.lock index 06bc462..cb4841c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,50 +31,78 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.2.8.1) - actionpack (= 5.2.8.1) + actioncable (7.2.1.1) + actionpack (= 7.2.1.1) + activesupport (= 7.2.1.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.8.1) - actionpack (= 5.2.8.1) - actionview (= 5.2.8.1) - activejob (= 5.2.8.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.8.1) - actionview (= 5.2.8.1) - activesupport (= 5.2.8.1) - rack (~> 2.0, >= 2.0.8) + zeitwerk (~> 2.6) + actionmailbox (7.2.1.1) + actionpack (= 7.2.1.1) + activejob (= 7.2.1.1) + activerecord (= 7.2.1.1) + activestorage (= 7.2.1.1) + activesupport (= 7.2.1.1) + mail (>= 2.8.0) + actionmailer (7.2.1.1) + actionpack (= 7.2.1.1) + actionview (= 7.2.1.1) + activejob (= 7.2.1.1) + activesupport (= 7.2.1.1) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (7.2.1.1) + actionview (= 7.2.1.1) + activesupport (= 7.2.1.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.8.1) - activesupport (= 5.2.8.1) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (7.2.1.1) + actionpack (= 7.2.1.1) + activerecord (= 7.2.1.1) + activestorage (= 7.2.1.1) + activesupport (= 7.2.1.1) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.2.1.1) + activesupport (= 7.2.1.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.8.1) - activesupport (= 5.2.8.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.1.1) + activesupport (= 7.2.1.1) globalid (>= 0.3.6) - activemodel (5.2.8.1) - activesupport (= 5.2.8.1) - activerecord (5.2.8.1) - activemodel (= 5.2.8.1) - activesupport (= 5.2.8.1) - arel (>= 9.0) - activestorage (5.2.8.1) - actionpack (= 5.2.8.1) - activerecord (= 5.2.8.1) - marcel (~> 1.0.0) - activesupport (5.2.8.1) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + activemodel (7.2.1.1) + activesupport (= 7.2.1.1) + activerecord (7.2.1.1) + activemodel (= 7.2.1.1) + activesupport (= 7.2.1.1) + timeout (>= 0.4.0) + activestorage (7.2.1.1) + actionpack (= 7.2.1.1) + activejob (= 7.2.1.1) + activerecord (= 7.2.1.1) + activesupport (= 7.2.1.1) + marcel (~> 1.0) + activesupport (7.2.1.1) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - arel (9.0.0) ast (2.4.2) base32-url (0.7.0) uuidtools (~> 2.1, >= 2.1.5) @@ -113,7 +141,8 @@ GEM simplecov (<= 0.13) coderay (1.1.3) colorize (0.8.1) - concurrent-ruby (1.1.10) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) crack (0.4.5) rexml crass (1.0.6) @@ -123,10 +152,12 @@ GEM csl-styles (1.0.1.11) csl (~> 1.0) dalli (2.7.11) + date (3.3.4) debug_inspector (1.1.0) diff-lcs (1.4.4) docile (1.1.5) dotenv (2.7.6) + drb (2.2.1) ebnf (2.5.0) htmlentities (~> 4.3) rdf (~> 3.3) @@ -137,7 +168,7 @@ GEM activesupport (>= 3.0, < 8.0) equivalent-xml (0.6.0) nokogiri (>= 1.4.3) - erubi (1.10.0) + erubi (1.13.0) excon (0.71.1) faraday (2.12.0) faraday-net_http (>= 2.0, < 3.4) @@ -162,11 +193,15 @@ GEM unicode_utils (>= 1.3.0) git (1.8.1) rchardet (~> 1.8) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.2.1) + activesupport (>= 6.1) htmlentities (4.3.4) i18n (1.8.11) concurrent-ruby (~> 1.0) + io-console (0.7.2) + irb (1.14.1) + rdoc (>= 4.0.0) + reline (>= 0.4.2) iso8601 (0.9.1) jaro_winkler (1.5.6) json (2.5.1) @@ -200,12 +235,15 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - loofah (2.9.1) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) - marcel (1.0.2) + net-imap + net-pop + net-smtp + marcel (1.0.4) maremma (5.0.0) activesupport (>= 4.2.5) addressable (>= 2.3.6) @@ -221,7 +259,6 @@ GEM oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) matrix (0.4.2) - method_source (1.0.0) mini_mime (1.0.3) minitest (5.14.4) msgpack (1.4.5) @@ -231,7 +268,16 @@ GEM racc (~> 1.7) net-http (0.4.1) uri - nio4r (2.5.9) + net-imap (0.5.0) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.0) + net-protocol + nio4r (2.7.3) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) nokogiri (1.16.7-x86_64-linux) @@ -246,39 +292,51 @@ 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.8) rack-cors (1.1.1) rack (>= 2.0.0) + rack-session (1.0.2) + rack (< 3) rack-test (1.1.0) rack (>= 1.0, < 3) rack-utf8_sanitizer (1.7.0) rack (>= 1.0, < 3.0) - rails (5.2.8.1) - actioncable (= 5.2.8.1) - actionmailer (= 5.2.8.1) - actionpack (= 5.2.8.1) - actionview (= 5.2.8.1) - activejob (= 5.2.8.1) - activemodel (= 5.2.8.1) - activerecord (= 5.2.8.1) - activestorage (= 5.2.8.1) - activesupport (= 5.2.8.1) - bundler (>= 1.3.0) - railties (= 5.2.8.1) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.2.1.1) + actioncable (= 7.2.1.1) + actionmailbox (= 7.2.1.1) + actionmailer (= 7.2.1.1) + actionpack (= 7.2.1.1) + actiontext (= 7.2.1.1) + actionview (= 7.2.1.1) + activejob (= 7.2.1.1) + activemodel (= 7.2.1.1) + activerecord (= 7.2.1.1) + activestorage (= 7.2.1.1) + activesupport (= 7.2.1.1) + bundler (>= 1.15.0) + railties (= 7.2.1.1) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - railties (5.2.8.1) - actionpack (= 5.2.8.1) - activesupport (= 5.2.8.1) - method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.2.1.1) + actionpack (= 7.2.1.1) + activesupport (= 7.2.1.1) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.0.0) rake (13.0.6) rb-fsevent (0.10.4) @@ -302,7 +360,11 @@ GEM rdf-xsd (3.3.0) rdf (~> 3.3) rexml (~> 3.2) + rdoc (6.7.0) + psych (>= 4.0.0) regexp_parser (2.1.1) + reline (0.5.10) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) rexml (3.2.6) @@ -338,6 +400,7 @@ GEM rubocop (>= 0.72.0) ruby-progressbar (1.11.0) scanf (1.0.0) + securerandom (0.3.1) sentry-raven (3.1.2) faraday (>= 1.0) simplecov (0.13.0) @@ -352,33 +415,33 @@ GEM sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) + stringio (3.1.1) sxp (2.0.0) matrix (~> 0.4) rdf (~> 3.3) - thor (1.1.0) - thread_safe (0.3.6) - tzinfo (1.2.11) - thread_safe (~> 0.1) + thor (1.3.2) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) tzinfo-data (1.2021.5) tzinfo (>= 1.0.0) unicode-display_width (1.6.1) unicode-types (1.10.0) unicode_utils (1.4.0) uri (0.13.1) + useragent (0.16.10) uuidtools (2.2.0) vcr (3.0.3) webmock (1.20.4) addressable (>= 2.3.6) crack (>= 0.3.2) + webrick (1.8.2) 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.18) zlib (2.1.1) PLATFORMS @@ -412,7 +475,7 @@ DEPENDENCIES oj_mimic_json (~> 1.0, >= 1.0.1) rack-cors (~> 1.0) rack-utf8_sanitizer (~> 1.6) - rails (~> 5.2) + rails (~> 7.1, >= 7.1.3) rspec-rails (~> 3.5, >= 3.5.2) rubocop (~> 0.77.0) rubocop-performance (~> 1.5, >= 1.5.1) From c7fb9780830f599eb9451730272e4428bd54889a Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 11:44:01 +0530 Subject: [PATCH 07/12] Updated ci with latest ruby --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18f503c..4c8c9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: MDS_PASSWORD: ${{ secrets.MDS_PASSWORD }} steps: - uses: actions/checkout@v3 - - name: Set up Ruby 2.6 + - name: Set up Ruby 3.1.4 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6.9' + ruby-version: '3.1.4' - uses: actions/cache@v3 with: path: vendor/bundle @@ -36,7 +36,7 @@ jobs: env: MYSQL_PORT: ${{ job.services.mysql.ports[3306] }} run: | - gem install bundler + gem install bundler:2.5.6 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: (Lint and) Test From 771732124c99d4811c24f03a146bfd245721d809 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 11:46:20 +0530 Subject: [PATCH 08/12] Do not consider schema 4.6, but consider latest bolognese gem version --- Gemfile | 2 +- Gemfile.lock | 56 +++++++++++++++++++++++----------------------------- 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/Gemfile b/Gemfile index 6035672..18eea58 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem "oj_mimic_json", "~> 1.0", ">= 1.0.1" gem "equivalent-xml", "~> 0.6.0" gem "nokogiri", ">= 1.10.4" gem "iso8601", "~> 0.9.0" -gem "bolognese", "~> 2.2", git: "https://github.com/datacite/bolognese.git", branch: "schema-4.6" #change to 2.3 when released +gem "bolognese", "~> 2.2" gem "maremma", ">= 4.9.8" gem "faraday", ">= 2.0", "< 3.0.0" gem "base32-url", "~> 0.5" diff --git a/Gemfile.lock b/Gemfile.lock index cb4841c..02ea5cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,33 +1,3 @@ -GIT - remote: https://github.com/datacite/bolognese.git - revision: 47f4562f7ccdee9949b1ef5290cf774a1c814c26 - branch: schema-4.6 - specs: - bolognese (2.2.0) - activesupport (>= 4.2.5) - benchmark_methods (~> 0.7) - bibtex-ruby (>= 5.1.0) - builder (~> 3.2, >= 3.2.2) - citeproc-ruby (~> 1.1, >= 1.1.12) - colorize (~> 0.8.1) - concurrent-ruby (~> 1.1, >= 1.1.5) - csl-styles (~> 1.0, >= 1.0.1.10) - edtf (~> 3.0, >= 3.0.4) - gender_detector (~> 0.1.2) - iso8601 (~> 0.9.1) - json-ld-preloaded (~> 3.1, >= 3.1.3) - jsonlint (~> 0.3.0) - loofah (~> 2.0, >= 2.0.3) - maremma (~> 5.0) - namae (~> 1.0) - nokogiri (~> 1.16, >= 1.16.2) - oj (~> 3.10) - oj_mimic_json (~> 1.0, >= 1.0.1) - postrank-uri (~> 1.0, >= 1.0.18) - rdf-rdfxml (~> 3.1) - rdf-turtle (~> 3.1) - thor (>= 0.19) - GEM remote: https://rubygems.org/ specs: @@ -119,6 +89,30 @@ GEM bigdecimal (3.1.8) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) + bolognese (2.2.0) + activesupport (>= 4.2.5) + benchmark_methods (~> 0.7) + bibtex-ruby (>= 5.1.0) + builder (~> 3.2, >= 3.2.2) + citeproc-ruby (~> 1.1, >= 1.1.12) + colorize (~> 0.8.1) + concurrent-ruby (~> 1.1, >= 1.1.5) + csl-styles (~> 1.0, >= 1.0.1.10) + edtf (~> 3.0, >= 3.0.4) + gender_detector (~> 0.1.2) + iso8601 (~> 0.9.1) + json-ld-preloaded (~> 3.1, >= 3.1.3) + jsonlint (~> 0.3.0) + loofah (~> 2.0, >= 2.0.3) + maremma (~> 5.0) + namae (~> 1.0) + nokogiri (~> 1.16, >= 1.16.2) + oj (~> 3.10) + oj_mimic_json (~> 1.0, >= 1.0.1) + postrank-uri (~> 1.0, >= 1.0.18) + rdf-rdfxml (~> 3.1) + rdf-turtle (~> 3.1) + thor (>= 0.19) bootsnap (1.7.7) msgpack (~> 1.0) builder (3.2.4) @@ -452,7 +446,7 @@ DEPENDENCIES base32-url (~> 0.5) better_errors binding_of_caller - bolognese (~> 2.2)! + bolognese (~> 2.2) bootsnap (>= 1.1.0) byebug cancancan (~> 2.0) From 178c0988ae26b4f9647902c1a44e6101f3a13721 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 12:03:34 +0530 Subject: [PATCH 09/12] Ruby 3.0.0 onwards URI#escape does not work. --- app/controllers/concerns/doiable.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/concerns/doiable.rb b/app/controllers/concerns/doiable.rb index bdf42c6..26db0c0 100644 --- a/app/controllers/concerns/doiable.rb +++ b/app/controllers/concerns/doiable.rb @@ -10,14 +10,14 @@ def extract_url(doi: nil, data: nil) end.to_h fail IdentifierError, "param 'doi' required" unless hsh["doi"].present? - fail IdentifierError, "doi parameter does not match doi of resource" if doi.present? && URI.unescape(hsh["doi"].strip).casecmp(doi) != 0 + fail IdentifierError, "doi parameter does not match doi of resource" if doi.present? && CGI.unescape(hsh["doi"].strip).casecmp(doi) != 0 - doi = URI.unescape(hsh["doi"].strip) unless doi.present? + doi = CGI.unescape(hsh["doi"].strip) unless doi.present? fail AbstractController::ActionNotFound unless doi.present? fail IdentifierError, "param 'url' required" unless hsh["url"].present? - [doi, URI.unescape(hsh["url"].strip)] + [doi, CGI.unescape(hsh["url"].strip)] end end From ee5e6244aa0575d49ae1a59d2f2cd72dc29732c6 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 12:21:12 +0530 Subject: [PATCH 10/12] Fixed dalli gem deprecation warning --- Gemfile | 3 ++- Gemfile.lock | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 18eea58..c4d8447 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem "bolognese", "~> 2.2" gem "maremma", ">= 4.9.8" gem "faraday", ">= 2.0", "< 3.0.0" gem "base32-url", "~> 0.5" -gem "dalli", "~> 2.7.6" +gem "dalli", "~> 3.2", ">= 3.2.8" gem "lograge", "~> 0.11.2" gem "logstash-event", "~> 1.2", ">= 1.2.02" gem "logstash-logger", "~> 0.26.1" @@ -26,6 +26,7 @@ gem "rack-cors", "~> 1.0", require: "rack/cors" gem "rack-utf8_sanitizer", "~> 1.6" gem "git", "~> 1.5" gem "sprockets", "~> 3.7", ">= 3.7.2" +gem 'next_rails' group :development, :test do gem "better_errors" diff --git a/Gemfile.lock b/Gemfile.lock index 02ea5cc..8be8a65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -145,7 +145,7 @@ GEM rexml csl-styles (1.0.1.11) csl (~> 1.0) - dalli (2.7.11) + dalli (3.2.8) date (3.3.4) debug_inspector (1.1.0) diff-lcs (1.4.4) @@ -271,6 +271,8 @@ GEM timeout net-smtp (0.5.0) net-protocol + next_rails (1.4.0) + rainbow (>= 3) nio4r (2.7.3) nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) @@ -452,7 +454,7 @@ DEPENDENCIES cancancan (~> 2.0) capybara codeclimate-test-reporter (~> 1.0.0) - dalli (~> 2.7.6) + dalli (~> 3.2, >= 3.2.8) dotenv equivalent-xml (~> 0.6.0) faraday (>= 2.0, < 3.0.0) @@ -464,6 +466,7 @@ DEPENDENCIES logstash-event (~> 1.2, >= 1.2.02) logstash-logger (~> 0.26.1) maremma (>= 4.9.8) + next_rails nokogiri (>= 1.10.4) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) From a373356323f87bd65975966b1e296986e1565dc5 Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 12:29:21 +0530 Subject: [PATCH 11/12] dalli store config as per new way --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index a7a77a5..d9bbf6f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -56,7 +56,7 @@ class Application < Rails::Application config.secret_key_base = 'blipblapblup' # configure caching - config.cache_store = :dalli_store, nil, { :namespace => ENV['APPLICATION'] } + config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"], { namespace: ENV["APPLICATION"] } # raise error with unpermitted parameters config.action_controller.action_on_unpermitted_parameters = :raise From 95566a1d327fcafbb56172181bf1e3a59c58dfcc Mon Sep 17 00:00:00 2001 From: Ashwini Sukale Date: Fri, 18 Oct 2024 12:35:37 +0530 Subject: [PATCH 12/12] Updated workflow actions --- .github/workflows/_update_terraform.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_update_terraform.yml b/.github/workflows/_update_terraform.yml index 572ea29..694cc8e 100644 --- a/.github/workflows/_update_terraform.yml +++ b/.github/workflows/_update_terraform.yml @@ -22,7 +22,7 @@ jobs: GIT_TAG: ${{ inputs.image_tag }} steps: - name: Checkout terraform config repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # public repo with terraform configuration repository: 'datacite/mastino' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aaa418..648a001 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Cache Docker layers diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c8c9ae..c5d43a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: MDS_USERNAME: ${{ secrets.MDS_USERNAME }} MDS_PASSWORD: ${{ secrets.MDS_PASSWORD }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby 3.1.4 uses: ruby/setup-ruby@v1 with: