diff --git a/.github/workflows/_update_terraform.yml b/.github/workflows/_update_terraform.yml index 572ea29..5a3d6d1 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' @@ -51,7 +51,7 @@ jobs: git add test/services/mds/_poodle.auto.tfvars git commit -m "Adding poodle git variables for tag ${{ steps.extract_variables.outputs.GIT_TAG }}" - name: Push changes - uses: ad-m/github-push-action@v0.7.0 + uses: ad-m/github-push-action@v0.8.0 with: github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} repository: 'datacite/mastino' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aaa418..9c8fe08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,29 +20,29 @@ 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 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18f503c..9822735 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,12 @@ jobs: MDS_USERNAME: ${{ secrets.MDS_USERNAME }} MDS_PASSWORD: ${{ secrets.MDS_PASSWORD }} steps: - - uses: actions/checkout@v3 - - name: Set up Ruby 2.6 + - uses: actions/checkout@v4 + - name: Set up Ruby 3.1.4 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6.9' - - uses: actions/cache@v3 + ruby-version: '3.1.4' + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} @@ -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 diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..a4f52a5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.0 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a7cf5b6..c25dbd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/passenger-full:2.1.0 +FROM phusion/passenger-full:3.0.7 LABEL maintainer="mfenner@datacite.org" # Set correct environment variables. @@ -11,8 +11,9 @@ RUN usermod -a -G docker_env app # Use baseimage-docker's init process. CMD ["/sbin/my_init"] -# Use Ruby 2.6.9 -RUN bash -lc 'rvm --default use ruby-2.6.9' +# Use Ruby 3.1.4 +RUN bash -lc 'rvm install ruby-3.2.0' && \ + bash -lc 'rvm --default use ruby-3.2.0' # Update installed APT packages RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \ @@ -44,8 +45,10 @@ RUN mkdir -p /home/app/webapp/vendor/bundle && \ # Install Ruby gems WORKDIR /home/app/webapp -RUN gem install bundler && \ - /sbin/setuser app bundle install --path vendor/bundle +RUN gem install rubygems-update -v 3.5.6 && \ + gem install bundler:2.5.6 && \ + su - app -c "bundle config set path 'vendor/bundle'" && \ + su - app -c 'cd /home/app/webapp && bundle install' # Run additional scripts during container startup (i.e. not at build time) WORKDIR /home/app/webapp diff --git a/Gemfile b/Gemfile index 7475f29..fad9f8f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,22 +2,22 @@ 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" 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.3.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" -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" @@ -26,6 +26,8 @@ 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' +gem 'base64', '~> 0.2.0' group :development, :test do gem "better_errors" @@ -37,7 +39,7 @@ group :development, :test do end group :development do - gem "listen", "~> 3.0.5" + gem "listen", "~> 3.7.1" gem "spring" gem "spring-watcher-listen", "~> 2.0.0" # gem "httplog", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock index d2c6039..20b3b99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,62 +1,95 @@ 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.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) + bolognese (2.3.2) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) @@ -71,9 +104,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) @@ -102,7 +135,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) @@ -111,62 +145,83 @@ 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) docile (1.1.5) 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.13.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) - ffi (1.15.5) + 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.17.0-arm64-darwin) + ffi (1.17.0-x86_64-linux-gnu) gender_detector (0.1.2) 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) - 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.1) + json-ld (~> 3.3) + rdf (~> 3.3) jsonlint (0.3.0) oj (~> 3) optimist (~> 3) jwt (1.5.6) 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.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -175,37 +230,58 @@ 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) - maremma (4.9.8) + net-imap + net-pop + net-smtp + 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.0.3) minitest (5.14.4) msgpack (1.4.5) multi_json (1.15.0) - multipart-post (2.3.0) - namae (1.1.1) - nio4r (2.5.9) - nokogiri (1.13.10-x86_64-linux) + multipart-post (2.4.1) + namae (1.2.0) + racc (~> 1.7) + net-http (0.4.1) + uri + 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 + next_rails (1.4.0) + rainbow (>= 3) + nio4r (2.7.3) + 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) - optimist (3.1.0) + optimist (3.2.0) parallel (1.20.1) parser (3.0.3.2) ast (~> 2.4.1) @@ -213,59 +289,79 @@ 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) - rb-inotify (0.10.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.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) + 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) @@ -301,8 +397,9 @@ 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) + securerandom (0.3.1) + sentry-raven (3.1.2) + faraday (>= 1.0) simplecov (0.13.0) docile (~> 1.1.0) json (>= 1.8, < 3) @@ -315,68 +412,74 @@ 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) - sxp (1.2.4) + stringio (3.1.1) + sxp (2.0.0) matrix (~> 0.4) - rdf (~> 3.2) - thor (1.1.0) - thread_safe (0.3.6) - tzinfo (1.2.11) - thread_safe (~> 0.1) + rdf (~> 3.3) + 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.9.0) + 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 + arm64-darwin-23 x86_64-linux DEPENDENCIES base32-url (~> 0.5) + base64 (~> 0.2.0) better_errors binding_of_caller - bolognese (~> 2.0.3) + bolognese (~> 2.3.2) bootsnap (>= 1.1.0) byebug 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 (~> 0.17.6) + faraday (>= 2.0, < 3.0.0) git (~> 1.5) iso8601 (~> 0.9.0) jwt (~> 1.5, >= 1.5.4) - listen (~> 3.0.5) + listen (~> 3.7.1) lograge (~> 0.11.2) logstash-event (~> 1.2, >= 1.2.02) logstash-logger (~> 0.26.1) - maremma (~> 4.9.8) + maremma (>= 4.9.8) + next_rails nokogiri (>= 1.10.4) oj (>= 2.8.3) 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) rubocop-rails (~> 2.4) - sentry-raven (~> 2.9) + sentry-raven (~> 3.1, >= 3.1.2) simplecov spring spring-watcher-listen (~> 2.0.0) @@ -386,4 +489,4 @@ DEPENDENCIES webmock (~> 1.20.0) BUNDLED WITH - 2.4.20 + 2.5.23 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 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 diff --git a/vendor/docker/webapp.conf b/vendor/docker/webapp.conf index 03e6273..ae69d39 100644 --- a/vendor/docker/webapp.conf +++ b/vendor/docker/webapp.conf @@ -6,6 +6,7 @@ server { passenger_enabled on; passenger_user app; passenger_ruby /usr/bin/ruby; + passenger_preload_bundler on; merge_slashes off; client_max_body_size 10m;