diff --git a/.circleci/config.yml b/.circleci/config.yml index fd2430dac..96ae4545e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: cimg/ruby:3.3.2-browsers + - image: cimg/ruby:3.3.5-browsers environment: # environment variables for primary container BUNDLE_JOBS: 3 BUNDLE_RETRY: 3 diff --git a/.dockerignore b/.dockerignore index c20ace88e..fb93064c9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,58 @@ -# Rails logs -log/ +# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. + +# Ignore git directory. +/.git/ +/.gitignore + +# Ignore bundler config. +/.bundle + +# Ignore all environment files (except templates). +/.env* +!/.env*.erb + +# Ignore all default key files. +/config/master.key +/config/credentials/*.key + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/.keep + +# Ignore storage (uploaded files in development and any SQLite databases). +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/.keep + +# Ignore assets. +/node_modules/ +/app/assets/builds/* +!/app/assets/builds/.keep +/public/assets + +# Ignore CI service files. +/.github + +# Ignore development files +/.devcontainer + +# Ignore Docker-related files +/.dockerignore +/Dockerfile* + + + +# Quepid docs docs/ -tmp/ + +# Rails generated artifacts coverage/ # Files used by Docker to build images @@ -9,9 +60,7 @@ docker-compose*.yml Dockerfile* .env -# GitHub and CircleCI configuration -.github/**/* -.github +# CircleCI configuration .circleci/**/* .circleci diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..f0527e6be --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: bundler + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.gitignore b/.gitignore index 0239feaf7..193086d04 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Temporary files generated by your text editor or operating system +# belong in git's global ignore instead: +# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore` + venv /tmp/storage/* !/tmp/storage/ diff --git a/.ruby-version b/.ruby-version index 477254331..fa7adc7ac 100755 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.2 +3.3.5 diff --git a/Dockerfile.dev b/Dockerfile.dev index 35c0b8f46..a232d7d56 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ruby:3.3.2-bullseye +FROM ruby:3.3.5-bullseye LABEL maintainer="quepid_admin@opensourceconnections.com" diff --git a/Dockerfile.prod b/Dockerfile.prod index defd46cb9..376a5bf6d 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,81 +1,86 @@ -FROM node:20-bullseye AS build-dep -WORKDIR /srv/app -COPY package.json yarn.lock ./ -RUN yarn install --production=true +# syntax = docker/dockerfile:1 -FROM ruby:3.3.2-bullseye +# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand: +# docker build -t my-app . +# docker run -d -p 80:80 -p 443:443 --name my-app -e RAILS_MASTER_KEY= my-app -LABEL maintainer="quepid_admin@opensourceconnections.com" +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version +ARG RUBY_VERSION=3.3.5 +FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base -ARG QUEPID_VERSION_VARIABLE -ENV QUEPID_VERSION=$QUEPID_VERSION_VARIABLE +# Rails app lives here +WORKDIR /rails -# Must have packages -RUN apt-get update -qq && apt-get install -y --no-install-recommends vim curl netcat \ - && rm -rf /var/lib/apt/lists/* +# Install base packages +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y curl default-mysql-client libjemalloc2 libvips && \ + rm -rf /var/lib/apt/lists /var/cache/apt/archives -# Node Only -RUN apt-get update -qq \ - && apt-get install -y --no-install-recommends ca-certificates gnupg \ - && mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && NODE_MAJOR=20 \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && apt-get update -qq \ - && apt-get install --no-install-recommends -y nodejs \ - && apt remove yarn \ - && rm -rf /var/lib/apt/lists/* +# Set production environment +ENV RAILS_ENV="production" \ + BUNDLE_DEPLOYMENT="1" \ + BUNDLE_PATH="/usr/local/bundle" \ + BUNDLE_WITHOUT="development" -# Install dependencies -WORKDIR /srv/app -COPY Gemfile Gemfile.lock ./ +# Throw-away build stage to reduce size of final image +FROM base AS build + +# Install packages needed to build gems +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev git node-gyp pkg-config python-is-python3 && \ + rm -rf /var/lib/apt/lists /var/cache/apt/archives + +# Install JavaScript dependencies +ARG NODE_VERSION=18.17.0 +ARG YARN_VERSION= +ENV PATH=/usr/local/node/bin:$PATH +RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \ + /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \ + npm install -g yarn@$YARN_VERSION && \ + rm -rf /tmp/node-build-master + +# Install application gems RUN gem install foreman -RUN gem install bundler:2.5.11 - -# Clean up Bundle -RUN bundle config set without 'development test' -RUN bundle config set deployment true -RUN bundle install --jobs 4 && \ - bundle clean --force && \ - rm -rf /app/.bundle/cache && \ - rm -rf /app/vendor/bundle/ruby/*/cache - -COPY --from=build-dep /srv/app/node_modules ./node_modules/ -#COPY . . -COPY ./app ./app -COPY ./app.json ./app.json -COPY ./babel.config.js ./babel.config.js -COPY ./bin ./bin -COPY ./config ./config -COPY ./config.ru ./config.ru -COPY ./db ./db -COPY ./Gemfile ./Gemfile -COPY ./Gemfile.lock ./Gemfile.lock -COPY ./lib ./lib -COPY ./LICENSE ./LICENSE -COPY ./package.json ./package.json -COPY ./postcss.config.js ./postcss.config.js -COPY ./Procfile ./Procfile - -# Exclude the /public/notebook directory -COPY ./public/images ./public/images -COPY ./public/javascripts ./public/javascripts -COPY ./public/*.html ./public -COPY ./public/robots.txt ./public - -COPY ./Rakefile ./Rakefile -COPY ./README.md ./README.md -COPY ./vendor ./vendor -COPY ./yarn.lock ./yarn.lock +COPY Gemfile Gemfile.lock ./ +RUN bundle install && \ + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ + bundle exec bootsnap precompile --gemfile + +# Install node modules +COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile + +# Copy application code +COPY . . + +# Precompile bootsnap code for faster boot times +RUN bundle exec bootsnap precompile app/ lib/ ADD https://github.com/o19s/quepid-jupyterlite/releases/latest/download/jupyter-lite-build.tgz ./notebooks.gz -RUN mkdir -p tmp/pids +# Precompiling assets for production without requiring secret RAILS_MASTER_KEY +RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile + + +RUN rm -rf node_modules + + +# Final stage for app image +FROM base + +# Copy built artifacts: gems, application +COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" +COPY --from=build /rails /rails -# Also unpacks the ./notebooks.gz file -RUN RAILS_ENV=production SECRET_KEY_BASE=fake_out_devise bundle exec rake assets:precompile +# Run and own only the runtime files as a non-root user for security +RUN groupadd --system --gid 1000 rails && \ + useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ + chown -R rails:rails db log storage tmp +USER 1000:1000 -# Remove some files not needed in resulting image -RUN rm package.json yarn.lock +# Entrypoint prepares the database. +ENTRYPOINT ["/rails/bin/docker-entrypoint"] +# Start the server by default, this can be overwritten at runtime +EXPOSE 3000 CMD ["foreman", "s", "-f", "Procfile"] diff --git a/Gemfile b/Gemfile index da8ecdad1..cc53df8a2 100755 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -ruby '3.3.2' +ruby '3.3.5' gem 'activerecord-import', '>= 1.0.7' gem 'active_storage_db' @@ -23,6 +23,7 @@ gem 'devise_invitable', '~> 2.0' # Using this as it wires in via Sprockets and I can't get npm version to work with the main app. # Had no luck with js/svg approach ;-( gem 'font-awesome-sass' +gem 'foreman' gem 'gabba' gem 'importmap-rails', '~> 2.0' gem 'intercom-rails' @@ -40,7 +41,7 @@ gem 'postmark-rails' gem 'prophet-rb', '~> 0.5.0' gem 'puma' gem 'pundit' -gem 'rails', '~> 7.1.2' +gem 'rails', '~> 7.2.1' gem 'rails-healthcheck', '~> 1.4' gem 'rails-html-sanitizer' gem 'rack-cors', '~> 2.0' @@ -51,12 +52,13 @@ gem 'rubyzip', '~> 2.3.0' # 3.0 will be breaking gem 'sassc-rails', '~> 2.1' gem 'sidekiq' gem 'sidekiq-limit_fetch', '~> 4.4' -gem 'terser' gem 'thor' gem 'turbo-rails', '~> 2.0', '>= 2.0.5' gem 'vega', '~> 0.3.0' group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem 'debug', platforms: [ :mri, :windows ], require: 'debug/prelude' gem 'annotate' gem 'bullet' gem 'memory_profiler' @@ -66,12 +68,12 @@ group :development do # Use console on exceptions pages [https://github.com/rails/web-console] gem 'web-console' - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - # Add me back in when Ruby 3.2.X comes out https://github.com/ruby/debug/issues/898 - # gem 'debug', platforms: [ :mri, :mingw, :x64_mingw ] - + # this was commented out in the default build, so doing the same.. # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] - gem 'rack-mini-profiler' + # gem 'rack-mini-profiler' + + # # Highlight the fine-grained location where an error occurred [https://github.com/ruby/error_highlight] + gem 'error_highlight', '>= 0.4.0', platforms: [ :ruby ] gem 'derailed_benchmarks' gem 'letter_opener' diff --git a/Gemfile.lock b/Gemfile.lock index efc6da506..d4858005d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,85 +1,81 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.3) - actionpack (= 7.1.3.3) - activesupport (= 7.1.3.3) + actioncable (7.2.1) + actionpack (= 7.2.1) + activesupport (= 7.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.3) - actionpack (= 7.1.3.3) - activejob (= 7.1.3.3) - activerecord (= 7.1.3.3) - activestorage (= 7.1.3.3) - activesupport (= 7.1.3.3) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.3) - actionpack (= 7.1.3.3) - actionview (= 7.1.3.3) - activejob (= 7.1.3.3) - activesupport (= 7.1.3.3) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.1) + actionpack (= 7.2.1) + activejob (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) + mail (>= 2.8.0) + actionmailer (7.2.1) + actionpack (= 7.2.1) + actionview (= 7.2.1) + activejob (= 7.2.1) + activesupport (= 7.2.1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.3.3) - actionview (= 7.1.3.3) - activesupport (= 7.1.3.3) + actionpack (7.2.1) + actionview (= 7.2.1) + activesupport (= 7.2.1) nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.3) - actionpack (= 7.1.3.3) - activerecord (= 7.1.3.3) - activestorage (= 7.1.3.3) - activesupport (= 7.1.3.3) + useragent (~> 0.16) + actiontext (7.2.1) + actionpack (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.3) - activesupport (= 7.1.3.3) + actionview (7.2.1) + activesupport (= 7.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - active_storage_db (1.3.0) + active_storage_db (1.3.1) activestorage (>= 6.0) rails (>= 6.0) - activejob (7.1.3.3) - activesupport (= 7.1.3.3) + activejob (7.2.1) + activesupport (= 7.2.1) globalid (>= 0.3.6) - activemodel (7.1.3.3) - activesupport (= 7.1.3.3) - activerecord (7.1.3.3) - activemodel (= 7.1.3.3) - activesupport (= 7.1.3.3) + activemodel (7.2.1) + activesupport (= 7.2.1) + activerecord (7.2.1) + activemodel (= 7.2.1) + activesupport (= 7.2.1) timeout (>= 0.4.0) - activerecord-import (1.7.0) + activerecord-import (1.8.1) activerecord (>= 4.2) - activestorage (7.1.3.3) - actionpack (= 7.1.3.3) - activejob (= 7.1.3.3) - activerecord (= 7.1.3.3) - activesupport (= 7.1.3.3) + activestorage (7.2.1) + actionpack (= 7.2.1) + activejob (= 7.2.1) + activerecord (= 7.2.1) + activesupport (= 7.2.1) marcel (~> 1.0) - activesupport (7.1.3.3) + activesupport (7.2.1) base64 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) acts_as_list (1.1.0) activerecord (>= 4.2) addressable (2.8.6) @@ -87,8 +83,8 @@ GEM aes_key_wrap (1.1.0) ancestry (4.3.3) activerecord (>= 5.2.6) - angular-rails-templates (1.2.1) - railties (>= 5.0, < 7.2) + angular-rails-templates (1.2.2) + railties (>= 5.0, < 7.3) sprockets (>= 3.0, < 5) sprockets-rails tilt @@ -96,7 +92,7 @@ GEM activerecord (>= 3.2, < 8.0) rake (>= 10.4, < 14.0) ansi (1.5.0) - apipie-rails (1.4.0) + apipie-rails (1.4.2) actionpack (>= 5.0) activesupport (>= 5.0) ast (2.4.2) @@ -108,8 +104,8 @@ GEM bindex (0.8.1) bootsnap (1.18.3) msgpack (~> 1.2) - builder (3.2.4) - bullet (7.1.6) + builder (3.3.0) + bullet (7.2.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) cal-heatmap-rails (3.6.2) @@ -127,7 +123,7 @@ GEM cmdstan (0.3.1) csv colorize (1.1.0) - concurrent-ruby (1.3.1) + concurrent-ruby (1.3.4) connection_pool (2.4.1) cookies_eu (1.7.8) js_cookie_rails (~> 2.2.0) @@ -140,6 +136,9 @@ GEM railties (>= 3.1) date (3.3.4) dead_end (4.0.0) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) derailed_benchmarks (2.1.2) benchmark-ips (~> 2) dead_end @@ -163,8 +162,8 @@ GEM devise (>= 4.6) docile (1.4.0) drb (2.2.1) - erubi (1.12.0) - execjs (2.9.1) + error_highlight (0.6.0) + erubi (1.13.0) faraday (2.9.0) faraday-net_http (>= 2.0, < 3.2) faraday-follow_redirects (0.3.0) @@ -174,6 +173,7 @@ GEM ffi (1.16.3) font-awesome-sass (6.5.2) sassc (~> 2.0) + foreman (0.88.1) gabba (1.0.1) get_process_mem (0.2.7) ffi (~> 1.0) @@ -183,7 +183,7 @@ GEM hashie (5.0.0) heapy (0.2.0) thor - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) importmap-rails (2.0.1) actionpack (>= 6.0.0) @@ -192,10 +192,10 @@ GEM intercom-rails (0.4.2) activesupport (> 3.0) 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) + jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) jquery-rails (4.6.0) @@ -226,6 +226,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) local_time (3.0.2) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -239,7 +240,7 @@ GEM memory_profiler (1.0.1) mini_histogram (0.3.1) mini_mime (1.1.5) - minitest (5.23.1) + minitest (5.25.1) minitest-reporters (1.6.1) ansi builder @@ -250,11 +251,10 @@ GEM msgpack (1.7.2) multi_xml (0.7.1) bigdecimal (~> 3.1) - mutex_m (0.2.0) mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.11) + net-imap (0.4.16) date net-protocol net-pop (0.1.2) @@ -264,9 +264,9 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.3) - nokogiri (1.16.5-aarch64-linux) + nokogiri (1.16.7-aarch64-linux) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) numo-narray (0.9.2.1) oauth2 (2.0.9) @@ -317,12 +317,10 @@ GEM nio4r (~> 2.0) pundit (2.3.2) activesupport (>= 3.0.0) - racc (1.8.0) + racc (1.8.1) rack (2.2.9) rack-cors (2.0.2) rack (>= 2.0.0) - rack-mini-profiler (3.3.1) - rack (>= 1.2.0) rack-protection (3.2.0) base64 (>= 0.1.0) rack (~> 2.2, >= 2.2.4) @@ -333,20 +331,20 @@ GEM rackup (1.0.0) rack (< 3) webrick - rails (7.1.3.3) - actioncable (= 7.1.3.3) - actionmailbox (= 7.1.3.3) - actionmailer (= 7.1.3.3) - actionpack (= 7.1.3.3) - actiontext (= 7.1.3.3) - actionview (= 7.1.3.3) - activejob (= 7.1.3.3) - activemodel (= 7.1.3.3) - activerecord (= 7.1.3.3) - activestorage (= 7.1.3.3) - activesupport (= 7.1.3.3) + rails (7.2.1) + actioncable (= 7.2.1) + actionmailbox (= 7.2.1) + actionmailer (= 7.2.1) + actionpack (= 7.2.1) + actiontext (= 7.2.1) + actionview (= 7.2.1) + activejob (= 7.2.1) + activemodel (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) bundler (>= 1.15.0) - railties (= 7.1.3.3) + railties (= 7.2.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -366,10 +364,10 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.3.3) - actionpack (= 7.1.3.3) - activesupport (= 7.1.3.3) - irb + railties (7.2.1) + actionpack (= 7.2.1) + activesupport (= 7.2.1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) @@ -387,7 +385,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) @@ -430,6 +428,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt + securerandom (0.3.1) selenium-webdriver (4.21.1) base64 (~> 0.2) rexml (~> 3.2, >= 3.2.5) @@ -458,11 +457,9 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stringio (3.1.0) + stringio (3.1.1) strscan (3.1.0) - terser (1.2.3) - execjs (>= 0.3.0, < 3) - thor (1.3.1) + thor (1.3.2) tilt (2.3.0) timeout (0.4.1) turbo-rails (2.0.5) @@ -474,6 +471,7 @@ GEM unicode-display_width (2.5.0) uniform_notifier (1.16.0) uri (0.13.0) + useragent (0.16.10) vega (0.3.1) version_gem (1.1.4) warden (1.2.9) @@ -487,14 +485,14 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) + webrick (1.8.2) websocket (1.2.10) 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.15) + zeitwerk (2.6.18) PLATFORMS aarch64-linux @@ -517,10 +515,13 @@ DEPENDENCIES colorize cookies_eu d3-rails (~> 3.5.5) + debug derailed_benchmarks devise (>= 4.6.2) devise_invitable (~> 2.0) + error_highlight (>= 0.4.0) font-awesome-sass + foreman gabba importmap-rails (~> 2.0) intercom-rails @@ -543,8 +544,7 @@ DEPENDENCIES puma pundit rack-cors (~> 2.0) - rack-mini-profiler - rails (~> 7.1.2) + rails (~> 7.2.1) rails-controller-testing rails-erd (~> 1.6) rails-healthcheck (~> 1.4) @@ -561,7 +561,6 @@ DEPENDENCIES sidekiq sidekiq-limit_fetch (~> 4.4) simplecov - terser thor turbo-rails (~> 2.0, >= 2.0.5) vega (~> 0.3.0) @@ -569,7 +568,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.3.2p78 + ruby 3.3.5p100 BUNDLED WITH 2.5.11 diff --git a/Procfile b/Procfile index 8a3007229..7a7566a30 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,4 @@ web: bundle exec puma -C config/puma.rb worker: bundle exec sidekiq -e production -C config/sidekiq.yml + +# if we ever get rid of the worker process in Prod, we can remove foreman diff --git a/app.json b/app.json index 80a76557d..e95b15ec1 100644 --- a/app.json +++ b/app.json @@ -97,5 +97,5 @@ }, "scripts": { }, - "stack": "heroku-22" + "stack": "heroku-24" } diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3bfa3389b..b110c52a2 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,6 +7,9 @@ class ApplicationController < ActionController::Base include Authentication::CurrentCaseManager include Authentication::CurrentBookManager + # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. + allow_browser versions: :modern + respond_to :html, :js before_action :set_current_user diff --git a/app/views/pwa/manifest.json.erb b/app/views/pwa/manifest.json.erb new file mode 100644 index 000000000..86ac17695 --- /dev/null +++ b/app/views/pwa/manifest.json.erb @@ -0,0 +1,22 @@ +{ + "name": "Quepid", + "icons": [ + { + "src": "/icon.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "/icon.png", + "type": "image/png", + "sizes": "512x512", + "purpose": "maskable" + } + ], + "start_url": "/", + "display": "standalone", + "scope": "/", + "description": "Quepid.", + "theme_color": "red", + "background_color": "red" +} diff --git a/app/views/pwa/service-worker.js b/app/views/pwa/service-worker.js new file mode 100644 index 000000000..b3a13fb7b --- /dev/null +++ b/app/views/pwa/service-worker.js @@ -0,0 +1,26 @@ +// Add a service worker for processing Web Push notifications: +// +// self.addEventListener("push", async (event) => { +// const { title, options } = await event.data.json() +// event.waitUntil(self.registration.showNotification(title, options)) +// }) +// +// self.addEventListener("notificationclick", function(event) { +// event.notification.close() +// event.waitUntil( +// clients.matchAll({ type: "window" }).then((clientList) => { +// for (let i = 0; i < clientList.length; i++) { +// let client = clientList[i] +// let clientPath = (new URL(client.url)).pathname +// +// if (clientPath == event.notification.data.path && "focus" in client) { +// return client.focus() +// } +// } +// +// if (clients.openWindow) { +// return clients.openWindow(event.notification.data.path) +// } +// }) +// ) +// }) diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint new file mode 100755 index 000000000..840d093a9 --- /dev/null +++ b/bin/docker-entrypoint @@ -0,0 +1,13 @@ +#!/bin/bash -e + +# Enable jemalloc for reduced memory usage and latency. +if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then + export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)" +fi + +# If running the rails server then create or migrate existing database +if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then + ./bin/rails db:prepare +fi + +exec "${@}" diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 000000000..40330c0ff --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") diff --git a/config/application.rb b/config/application.rb index 054d204cc..d9d530fe6 100755 --- a/config/application.rb +++ b/config/application.rb @@ -11,7 +11,7 @@ module Quepid class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 7.2 # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. diff --git a/config/environments/development.rb b/config/environments/development.rb index 66555286f..d307fffc2 100755 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -18,7 +18,7 @@ # Show full error reports. config.consider_all_requests_local = true - # Enable server timing + # Enable server timing. config.server_timing = true # Enable/disable caching. By default caching is disabled. @@ -27,9 +27,7 @@ config.action_controller.perform_caching = true config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}", - } + config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -44,6 +42,8 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. @@ -77,7 +77,7 @@ # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true + config.action_view.annotate_rendered_view_with_filenames = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. @@ -103,7 +103,7 @@ config.action_cable.disable_request_forgery_protection = true config.action_cable.allowed_request_origins = '*' - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true # Enable detailed ActionCable logging @@ -113,5 +113,8 @@ :transmissions, :state_updates ] + + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! end # rubocop:enable Metrics/BlockLength diff --git a/config/environments/production.rb b/config/environments/production.rb index f2eeafdb8..9edf3661d 100755 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'active_support/core_ext/integer/time' -Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor +# Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -26,12 +26,12 @@ # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it). + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :terser - config.assets.css_compressor = :sass + # config.assets.js_compressor = :terser + # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false @@ -62,6 +62,9 @@ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + # Log to STDOUT by default config.logger = ActiveSupport::Logger.new($stdout) .tap { |logger| logger.formatter = Logger::Formatter.new } @@ -70,7 +73,7 @@ # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] - # Info include generic and useful information about system operation, but avoids logging too much + # "nfo" includes generic and useful information about system operation, but avoids logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). If you # want to log everything, set the level to "debug". config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') @@ -79,9 +82,11 @@ # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque + # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "quepid_production" + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e317d7c24..21952afe4 100755 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor +# Sprockets.register_compressor 'application/javascript', :terser, Terser::Compressor Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -26,8 +26,8 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :terser - config.assets.css_compressor = :sass + # config.assets.js_compressor = :terser + # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false diff --git a/config/environments/test.rb b/config/environments/test.rb index 62e9c1738..824f2d47e 100755 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -20,18 +20,15 @@ config.eager_load = ENV['CI'].present? # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.to_i}", - } + config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = :none + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false @@ -39,6 +36,8 @@ # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. @@ -46,6 +45,10 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Unlike controllers, the mailer instance doesn't have any context about the + # incoming request so you'll need to provide the :host parameter yourself. + config.action_mailer.default_url_options = { host: 'localhost', port: '3000' } + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr @@ -61,8 +64,6 @@ # Raises error for missing translations # config.action_view.raise_on_missing_translations = true - config.action_mailer.default_url_options = { host: 'localhost', port: '3000' } - # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise @@ -75,9 +76,11 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true + config.active_job.queue_adapter = :test + ENV['TC_URL'] = 'https://quepid.com/agreement' ENV['QUEPID_GA'] = 'UA-FAKE-GA-CODE-FOR-TESTING' diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index ae4016a03..738c14a20 100755 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -7,7 +7,7 @@ # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :document_fields + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :document_fields ] Rails.application.config.filter_parameters += [ diff --git a/config/initializers/new_framework_defaults_7_2.rb b/config/initializers/new_framework_defaults_7_2.rb new file mode 100644 index 000000000..0344a6d02 --- /dev/null +++ b/config/initializers/new_framework_defaults_7_2.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.2 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.2`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# Controls whether Active Job's `#perform_later` and similar methods automatically defer +# the job queuing to after the current Active Record transaction is committed. +# +# Example: +# Topic.transaction do +# topic = Topic.create(...) +# NewTopicNotificationJob.perform_later(topic) +# end +# +# In this example, if the configuration is set to `:never`, the job will +# be enqueued immediately, even though the `Topic` hasn't been committed yet. +# Because of this, if the job is picked up almost immediately, or if the +# transaction doesn't succeed for some reason, the job will fail to find this +# topic in the database. +# +# If `enqueue_after_transaction_commit` is set to `:default`, the queue adapter +# will define the behaviour. +# +# Note: Active Job backends can disable this feature. This is generally done by +# backends that use the same database as Active Record as a queue, hence they +# don't need this feature. +#++ +# Rails.application.config.active_job.enqueue_after_transaction_commit = :default + +### +# Adds image/webp to the list of content types Active Storage considers as an image +# Prevents automatic conversion to a fallback PNG, and assumes clients support WebP, as they support gif, jpeg, and png. +# This is possible due to broad browser support for WebP, but older browsers and email clients may still not support +# WebP. Requires imagemagick/libvips built with WebP support. +#++ +# Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp] + +### +# Enable validation of migration timestamps. When set, an ActiveRecord::InvalidMigrationTimestampError +# will be raised if the timestamp prefix for a migration is more than a day ahead of the timestamp +# associated with the current time. This is done to prevent forward-dating of migration files, which can +# impact migration generation and other migration commands. +# +# Applications with existing timestamped migrations that do not adhere to the +# expected format can disable validation by setting this config to `false`. +#++ +# Rails.application.config.active_record.validate_migration_timestamps = true + +### +# Controls whether the PostgresqlAdapter should decode dates automatically with manual queries. +# +# Example: +# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date") #=> Date +# +# This query used to return a `String`. +#++ +# Rails.application.config.active_record.postgresql_adapter_decode_dates = true + +### +# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are +# deploying to a memory constrained environment you may want to set this to `false`. +#++ +# Rails.application.config.yjit = true diff --git a/config/puma.rb b/config/puma.rb index 058e48d55..2834e5552 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -52,8 +52,12 @@ # environment ENV.fetch("RAILS_ENV") { "development" } -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } +### Specifies the `pidfile` that Puma will use. +###pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/config/routes.rb b/config/routes.rb index 8565742c3..6449a581a 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,11 @@ apipie mount ActiveStorageDB::Engine => '/active_storage_db' Healthcheck.routes(self) + + # Render dynamic PWA files from app/views/pwa/* + get 'service-worker' => 'rails/pwa#service_worker', as: :pwa_service_worker + get 'manifest' => 'rails/pwa#manifest', as: :pwa_manifest + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. get 'up' => 'rails/health#show', as: :rails_health_check diff --git a/config/sidekiq.yml b/config/sidekiq.yml index ad64d3db9..b11b5a542 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -7,4 +7,4 @@ production: - default - bulk_processing :limits: - bulk_processing: 1 + bulk_processing: 2 diff --git a/db/schema.rb b/db/schema.rb index 116dc63f7..006150a3f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_06_26_181338) do +ActiveRecord::Schema[7.2].define(version: 2024_06_26_181338) do create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_bin", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false diff --git a/docker-compose.yml b/docker-compose.yml index 9ee7f377d..e259d5e8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: - PUPPETEER_SKIP_DOWNLOAD=true - PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium volumes: - - .:/srv/app + - .:/srv/app:cached - ./log:/log ports: - 3000:3000 diff --git a/package.json b/package.json index f18c75205..1a0e543db 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "license": "Apache-2.0", "dependencies": { "@popperjs/core": "^2.11.6", - "@rails/actioncable": "7.1.3-3", - "@rails/activestorage": "7.1.3-3", + "@rails/actioncable": "7.2.0", + "@rails/activestorage": "7.2.0", "ace-builds": "^1.32.2", "angular": "~1.8.3", "angular-animate": "^1.8.3", diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html new file mode 100644 index 000000000..7cf1e168e --- /dev/null +++ b/public/406-unsupported-browser.html @@ -0,0 +1,66 @@ + + + + Your browser is not supported (406) + + + + + + +
+
+

Your browser is not supported.

+

Please upgrade your browser to continue.

+
+
+ + diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 000000000..f3b5abcbd Binary files /dev/null and b/public/icon.png differ diff --git a/public/icon.svg b/public/icon.svg new file mode 100644 index 000000000..78307ccd4 --- /dev/null +++ b/public/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/storage/.keep b/storage/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/controllers/application_system_test_case.rb b/test/controllers/application_system_test_case.rb index d29b64104..918ad2ecc 100644 --- a/test/controllers/application_system_test_case.rb +++ b/test/controllers/application_system_test_case.rb @@ -3,5 +3,5 @@ require 'test_helper' class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [ 1400, 1400 ] + driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ] end diff --git a/test/controllers/proxy_controller_test.rb b/test/controllers/proxy_controller_test.rb index e4157e7c9..99a5e7e1f 100644 --- a/test/controllers/proxy_controller_test.rb +++ b/test/controllers/proxy_controller_test.rb @@ -5,12 +5,11 @@ # rubocop:disable Layout/LineLength class ProxyControllerTest < ActionDispatch::IntegrationTest test 'should require a url query parameter' do - assert_raises(ActionController::ParameterMissing) do - get proxy_fetch_path - end - assert_raises(ActionController::ParameterMissing) do - post proxy_fetch_path - end + get proxy_fetch_path + assert_response :bad_request + + post proxy_fetch_path + assert_response :bad_request end test 'should be able to handle a get' do diff --git a/test/integration/tries_ancestry_lifecycle_test.rb b/test/integration/tries_ancestry_lifecycle_test.rb index 4bcd48ecd..1c77e3ac0 100644 --- a/test/integration/tries_ancestry_lifecycle_test.rb +++ b/test/integration/tries_ancestry_lifecycle_test.rb @@ -3,19 +3,6 @@ require 'test_helper' class TriesAncestryLifecycleTest < ActionDispatch::IntegrationTest - test 'create 200 tries behavior' do - root = Try.new(name: 'Try Root') - root.save! - - parent = root - 200.times do |i| - try = Try.new(name: "Try #{i}") - try.parent = parent - try.save! - parent = try - end - end - test 'Creates a new root try when ancestry tree gets to be too much' do root_tries = [] root = Try.new(name: 'Try Root') diff --git a/yarn.lock b/yarn.lock index 2d081f5ef..a440e72b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,15 +49,15 @@ unbzip2-stream "1.4.3" yargs "17.7.2" -"@rails/actioncable@7.1.3-3": - version "7.1.3-3" - resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.1.3-3.tgz#e181c436493ba7388a44652fc89dd7d2ea9a1675" - integrity sha512-AsbQtOax/L95Qk05GAXs5E42UC0AYR3AtitLi0zaTr9wCMNzK/XNaCT8xC90cB9aX6UM/9IrZ31MsmaZOg1nXw== - -"@rails/activestorage@7.1.3-3": - version "7.1.3-3" - resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-7.1.3-3.tgz#ae8c28ec2cd86d5864b3102e625621954b8e731c" - integrity sha512-lSsKszRA+e60VdWM3zqVT+PUuZ+MurIq2Xh2VS8RBZ7BpDWlfg+VRCWzxoZyahnhj8eqTRosBmsPDfJbBC7+1A== +"@rails/actioncable@7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.2.0.tgz#dee66d21bc125a9819dc8080ce896eac78d8c63f" + integrity sha512-crcsPF3skrqJkFZLxesZoyUEt8ol25XtTuOAUMdLa5qQKWTZpL8eLVW71bDCwKDQLbV2z5sBZ/XGEC0i+ZZa+A== + +"@rails/activestorage@7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-7.2.0.tgz#bc03b52a687ba2bb9d2e6381f25795cda037494e" + integrity sha512-jXK9tKDZn/j+ZeJuFdrtyrLNLWjzYRyp+mejWTfSp+egAp1okXsdfFNe8jqqgwcP8gytqJSPwo0sZwQVdQpuIA== dependencies: spark-md5 "^3.0.1"