diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 754d06ad..40dc470d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.2 + ruby-version: 4.0.1 - name: Cache gems uses: actions/cache@v4 with: @@ -37,7 +37,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.2 + ruby-version: 4.0.1 - name: Cache gems uses: actions/cache@v4 with: @@ -62,7 +62,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v1 with: - node-version: 20.9.0 + node-version: 20.19.0 - name: Cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" @@ -89,7 +89,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.2 + ruby-version: 4.0.1 - name: Cache gems uses: actions/cache@v4 with: @@ -132,11 +132,11 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.2 + ruby-version: 4.0.1 - name: Set up Node uses: actions/setup-node@v1 with: - node-version: 20.9.0 + node-version: 20.19.0 - name: Install Chrome uses: browser-actions/setup-chrome@latest with: diff --git a/.rubocop.yml b/.rubocop.yml index ffb49de1..bda7960e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,4 @@ -require: +plugins: - rubocop-performance - rubocop-rails - rubocop-rspec @@ -10,7 +10,7 @@ AllCops: - node_modules/**/* - bin/* - vendor/**/* - TargetRubyVersion: '3.3' + TargetRubyVersion: '4.0' SuggestExtensions: false Metrics/BlockLength: @@ -100,3 +100,9 @@ Rails/ApplicationController: Rails/Output: Enabled: false + +Rails/StrongParametersExpect: + Enabled: false + +Rails/RedirectBackOrTo: + Enabled: false diff --git a/Dockerfile b/Dockerfile index db704a15..3d296004 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4.2-alpine AS download +FROM ruby:4.0.1-alpine AS download WORKDIR /fonts @@ -16,7 +16,7 @@ RUN apk --no-cache add fontforge wget && \ RUN fontforge -lang=py -c 'font1 = fontforge.open("FreeSans.ttf"); font2 = fontforge.open("NotoSansSymbols2-Regular.ttf"); font1.mergeFonts(font2); font1.generate("FreeSans.ttf")' -FROM ruby:3.4.2-alpine AS webpack +FROM ruby:4.0.1-alpine AS webpack ENV RAILS_ENV=production ENV NODE_ENV=production @@ -42,7 +42,7 @@ COPY ./app/views ./app/views RUN echo "gem 'shakapacker'" > Gemfile && ./bin/shakapacker -FROM ruby:3.4.2-alpine AS app +FROM ruby:4.0.1-alpine AS app ENV RAILS_ENV=production ENV BUNDLE_WITHOUT="development:test" @@ -51,7 +51,7 @@ ENV OPENSSL_CONF=/etc/openssl_legacy.cnf WORKDIR /app -RUN apk add --no-cache sqlite-dev libpq-dev mariadb-dev vips-dev yaml-dev redis libheif vips-heif gcompat ttf-freefont && mkdir /fonts && rm /usr/share/fonts/freefont/FreeSans.otf +RUN apk add --no-cache sqlite-dev libpq-dev mariadb-dev vips-dev yaml-dev redis libheif vips-heif gcompat ttf-freefont onnxruntime && mkdir /fonts && rm /usr/share/fonts/freefont/FreeSans.otf RUN addgroup -g 2000 docuseal && adduser -u 2000 -G docuseal -s /bin/sh -D -h /home/docuseal docuseal @@ -71,8 +71,6 @@ COPY --chown=docuseal:docuseal ./Gemfile ./Gemfile.lock ./ RUN apk add --no-cache build-base && bundle install && apk del --no-cache build-base && rm -rf ~/.bundle /usr/local/bundle/cache && ruby -e "puts Dir['/usr/local/bundle/**/{spec,rdoc,resources/shared,resources/collation,resources/locales}']" | xargs rm -rf && ln -sf /usr/lib/libonnxruntime.so.1 $(ruby -e "print Dir[Gem::Specification.find_by_name('onnxruntime').gem_dir + '/vendor/*.so'].first") -RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories && echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && apk add --no-cache onnxruntime - COPY --chown=docuseal:docuseal ./bin ./bin COPY --chown=docuseal:docuseal ./app ./app COPY --chown=docuseal:docuseal ./config ./config diff --git a/Gemfile b/Gemfile index b0974208..650cde01 100644 --- a/Gemfile +++ b/Gemfile @@ -2,16 +2,16 @@ source 'https://rubygems.org' -ruby '3.4.2' +ruby '4.0.1' -gem 'arabic-letter-connector', require: 'arabic-letter-connector/logic' +gem 'arabic-letter-connector', require: false gem 'aws-sdk-s3', require: false gem 'aws-sdk-secretsmanager', require: false -gem 'azure-storage-blob', require: false +gem 'azure-blob', require: false gem 'bootsnap', require: false gem 'cancancan' -gem 'csv' -gem 'csv-safe' +gem 'csv', require: false +gem 'csv-safe', require: false gem 'devise' gem 'devise-two-factor' gem 'dotenv', require: false @@ -21,12 +21,12 @@ gem 'faraday-follow_redirects' gem 'google-cloud-storage', require: false gem 'hexapdf' gem 'image_processing' -gem 'jwt' +gem 'jwt', require: false gem 'lograge' gem 'mysql2', require: false -gem 'numo-narray' +gem 'numo-narray-alt', require: false gem 'oj' -gem 'onnxruntime' +gem 'onnxruntime', require: false gem 'pagy' gem 'pg', require: false gem 'premailer-rails' @@ -38,9 +38,9 @@ gem 'rails_autolink' gem 'rails-i18n' gem 'rotp' gem 'rouge', require: false -gem 'rqrcode' +gem 'rqrcode', require: false gem 'ruby-vips' -gem 'rubyXL' +gem 'rubyXL', require: false gem 'shakapacker' gem 'sidekiq' gem 'sqlite3', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 72f12d84..e4419ff0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,31 @@ GEM remote: https://rubygems.org/ specs: - actioncable (8.0.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.1) + action_text-trix (2.1.16) + railties + actioncable (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionmailbox (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) - actionmailer (8.0.2.1) - actionpack (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionmailer (8.1.2) + actionpack (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.2.1) - actionview (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionpack (8.1.2) + actionview (= 8.1.2) + activesupport (= 8.1.2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -31,55 +33,58 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.2.1) - actionpack (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + actiontext (8.1.2) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.2.1) - activesupport (= 8.0.2.1) + actionview (8.1.2) + activesupport (= 8.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.2.1) - activesupport (= 8.0.2.1) + activejob (8.1.2) + activesupport (= 8.1.2) globalid (>= 0.3.6) - activemodel (8.0.2.1) - activesupport (= 8.0.2.1) - activerecord (8.0.2.1) - activemodel (= 8.0.2.1) - activesupport (= 8.0.2.1) + activemodel (8.1.2) + activesupport (= 8.1.2) + activerecord (8.1.2) + activemodel (= 8.1.2) + activesupport (= 8.1.2) timeout (>= 0.4.0) - activestorage (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activesupport (= 8.0.2.1) + activestorage (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activesupport (= 8.1.2) marcel (~> 1.0) - activesupport (8.0.2.1) + activesupport (8.1.2) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) - annotaterb (4.14.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) + annotaterb (4.20.0) + activerecord (>= 6.0.0) + activesupport (>= 6.0.0) arabic-letter-connector (0.1.1) ast (2.4.3) aws-eventstream (1.4.0) - aws-partitions (1.1197.0) - aws-sdk-core (3.240.0) + aws-partitions (1.1209.0) + aws-sdk-core (3.241.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -87,44 +92,38 @@ GEM bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.118.0) - aws-sdk-core (~> 3, >= 3.239.1) + aws-sdk-kms (1.121.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.208.0) - aws-sdk-core (~> 3, >= 3.234.0) + aws-sdk-s3 (1.212.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sdk-secretsmanager (1.110.0) - aws-sdk-core (~> 3, >= 3.210.0) + aws-sdk-secretsmanager (1.128.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sigv4 (~> 1.5) aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) - azure-storage-blob (2.0.3) - azure-storage-common (~> 2.0) - nokogiri (~> 1, >= 1.10.8) - azure-storage-common (2.0.4) - faraday (~> 1.0) - faraday_middleware (~> 1.0, >= 1.0.0.rc1) - net-http-persistent (~> 4.0) - nokogiri (~> 1, >= 1.10.8) + azure-blob (0.8.0) + cgi + rexml base64 (0.3.0) - bcrypt (3.1.20) - benchmark (0.4.1) - better_html (2.1.1) - actionview (>= 6.0) - activesupport (>= 6.0) + bcrypt (3.1.21) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) ast (~> 2.0) erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (3.2.2) + bigdecimal (4.0.1) bindex (0.8.1) - bootsnap (1.18.4) + bootsnap (1.21.1) msgpack (~> 1.2) - brakeman (7.0.0) + brakeman (7.1.2) racc builder (3.3.0) - bullet (8.0.0) + bullet (8.1.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) camertron-eprun (1.1.1) @@ -138,28 +137,29 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) + cgi (0.5.1) childprocess (5.1.0) logger (~> 1.5) chunky_png (1.4.0) cldr-plurals-runtime-rb (1.1.0) cmdparse (3.0.7) coderay (1.1.3) - concurrent-ruby (1.3.5) - connection_pool (2.5.3) - crack (1.0.0) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + crack (1.0.1) bigdecimal rexml crass (1.0.6) - css_parser (1.21.0) + css_parser (1.21.1) addressable - csv (3.3.2) + csv (3.3.5) csv-safe (3.3.1) csv (~> 3.0) - cuprite (0.15.1) + cuprite (0.17) capybara (~> 3.0) - ferrum (~> 0.15.0) - date (3.4.1) - debug (1.10.0) + ferrum (~> 0.17.0) + date (3.5.1) + debug (1.11.1) irb (~> 1.10) reline (>= 0.3.8) declarative (0.0.20) @@ -169,20 +169,20 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-two-factor (6.1.0) - activesupport (>= 7.0, < 8.1) - devise (~> 4.0) - railties (>= 7.0, < 8.1) + devise-two-factor (6.3.1) + activesupport (>= 7.0, < 8.2) + devise (>= 4.0, < 5.0) + railties (>= 7.0, < 8.2) rotp (~> 6.0) - diff-lcs (1.5.1) - digest-crc (0.6.5) + diff-lcs (1.6.2) + digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) docile (1.4.1) - dotenv (3.1.7) + dotenv (3.2.0) drb (2.2.3) email_typo (0.2.3) - erb (5.0.2) - erb_lint (0.7.0) + erb (6.0.1) + erb_lint (0.9.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) @@ -190,117 +190,101 @@ GEM rubocop (>= 1) smart_properties erubi (1.13.1) - factory_bot (6.5.0) - activesupport (>= 5.0.0) - factory_bot_rails (6.4.4) + factory_bot (6.5.6) + activesupport (>= 6.1.0) + factory_bot_rails (6.5.1) factory_bot (~> 6.5) - railties (>= 5.0.0) - faker (3.5.1) + railties (>= 6.1.0) + faker (3.6.0) i18n (>= 1.8.11, < 2) - faraday (1.10.4) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-follow_redirects (0.3.0) + faraday (2.14.0) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) - faraday-httpclient (1.0.1) - faraday-multipart (1.1.0) - multipart-post (~> 2.0) - faraday-net_http (1.0.2) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - faraday_middleware (1.2.1) - faraday (~> 1.0) - ferrum (0.15) + faraday-net_http (3.4.2) + net-http (~> 0.5) + ferrum (0.17.1) addressable (~> 2.5) + base64 (~> 0.2) concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) - ffi (1.17.1) - ffi (1.17.1-aarch64-linux-gnu) - ffi (1.17.1-aarch64-linux-musl) - ffi (1.17.1-arm64-darwin) - ffi (1.17.1-x86_64-linux-gnu) - ffi (1.17.1-x86_64-linux-musl) - foreman (0.88.1) + ffi (1.17.3) + ffi (1.17.3-aarch64-linux-gnu) + ffi (1.17.3-aarch64-linux-musl) + ffi (1.17.3-arm64-darwin) + ffi (1.17.3-x86_64-linux-gnu) + ffi (1.17.3-x86_64-linux-musl) + foreman (0.90.0) + thor (~> 1.4) geom2d (0.4.1) - globalid (1.2.1) + globalid (1.3.0) activesupport (>= 6.1) - google-apis-core (0.15.1) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 1.9) - httpclient (>= 2.8.3, < 3.a) - mini_mime (~> 1.0) - mutex_m + google-apis-core (1.0.2) + addressable (~> 2.8, >= 2.8.7) + faraday (~> 2.13) + faraday-follow_redirects (~> 0.3) + googleauth (~> 1.14) + mini_mime (~> 1.1) representable (~> 3.0) - retriable (>= 2.0, < 4.a) - google-apis-iamcredentials_v1 (0.22.0) + retriable (~> 3.1) + google-apis-iamcredentials_v1 (0.26.0) google-apis-core (>= 0.15.0, < 2.a) - google-apis-storage_v1 (0.49.0) + google-apis-storage_v1 (0.59.0) google-apis-core (>= 0.15.0, < 2.a) - google-cloud-core (1.7.1) + google-cloud-core (1.8.0) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (2.2.1) + google-cloud-env (2.3.1) + base64 (~> 0.2) faraday (>= 1.0, < 3.a) - google-cloud-errors (1.4.0) - google-cloud-storage (1.54.0) + google-cloud-errors (1.5.0) + google-cloud-storage (1.58.0) addressable (~> 2.8) digest-crc (~> 0.4) - google-apis-core (~> 0.13) + google-apis-core (>= 0.18, < 2) google-apis-iamcredentials_v1 (~> 0.18) - google-apis-storage_v1 (~> 0.38) + google-apis-storage_v1 (>= 0.42) google-cloud-core (~> 1.6) googleauth (~> 1.9) mini_mime (~> 1.0) - google-logging-utils (0.1.0) - googleauth (1.12.2) + google-logging-utils (0.2.0) + googleauth (1.16.1) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.2) google-logging-utils (~> 0.1) - jwt (>= 1.4, < 3.0) + jwt (>= 1.4, < 4.0) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) - hashdiff (1.1.2) - hexapdf (1.4.0) + hashdiff (1.2.1) + hexapdf (1.5.0) cmdparse (~> 3.0, >= 3.0.3) geom2d (~> 0.4, >= 0.4.1) openssl (>= 2.2.1) strscan (>= 3.1.2) - htmlentities (4.3.4) - httpclient (2.8.3) - i18n (1.14.7) + htmlentities (4.4.2) + i18n (1.14.8) concurrent-ruby (~> 1.0) - image_processing (1.13.0) - mini_magick (>= 4.9.5, < 5) + image_processing (1.14.0) + mini_magick (>= 4.9.5, < 6) ruby-vips (>= 2.0.17, < 3) - io-console (0.8.1) - irb (1.15.2) + io-console (0.8.2) + irb (1.16.0) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) jmespath (1.6.2) - json (2.15.0) - jwt (2.9.3) + json (2.18.0) + jwt (3.1.2) base64 language_server-protocol (3.17.0.5) - launchy (3.0.1) + launchy (3.1.1) addressable (~> 2.8) childprocess (~> 5.0) + logger (~> 1.6) letter_opener (1.10.0) launchy (>= 2.2, < 4) letter_opener_web (3.0.0) @@ -315,29 +299,30 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.24.1) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.4) - matrix (0.4.2) + marcel (1.1.0) + matrix (0.4.3) method_source (1.1.0) - mini_magick (4.13.2) + mini_magick (5.3.1) + logger mini_mime (1.1.5) - mini_portile2 (2.8.9) - minitest (5.25.5) - msgpack (1.7.5) - multi_json (1.15.0) - multipart-post (2.4.1) - mutex_m (0.3.0) - mysql2 (0.5.6) - net-http-persistent (4.0.5) - connection_pool (~> 2.2) - net-imap (0.5.9) + minitest (6.0.1) + prism (~> 1.5) + msgpack (1.8.0) + multi_json (1.19.1) + mysql2 (0.5.7) + bigdecimal + net-http (0.9.1) + uri (>= 0.11.1) + net-imap (0.6.2) date net-protocol net-pop (0.1.2) @@ -346,22 +331,19 @@ GEM timeout net-smtp (0.5.1) net-protocol - nio4r (2.7.4) - nokogiri (1.18.9) - mini_portile2 (~> 2.8.2) + nio4r (2.7.5) + nokogiri (1.19.0-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.9-aarch64-linux-gnu) + nokogiri (1.19.0-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.18.9-aarch64-linux-musl) + nokogiri (1.19.0-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.9-arm64-darwin) + nokogiri (1.19.0-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.9-x86_64-linux-gnu) + nokogiri (1.19.0-x86_64-linux-musl) racc (~> 1.4) - nokogiri (1.18.9-x86_64-linux-musl) - racc (~> 1.4) - numo-narray (0.9.2.1) - oj (3.16.11) + numo-narray-alt (0.9.13) + oj (3.16.13) bigdecimal (>= 3.0) ostruct (>= 0.2) onnxruntime (0.10.1) @@ -372,18 +354,25 @@ GEM ffi onnxruntime (0.10.1-x86_64-linux) ffi - openssl (3.3.0) + openssl (4.0.0) orm_adapter (0.5.0) os (1.1.4) ostruct (0.6.3) - package_json (0.1.0) - pagy (9.3.3) + package_json (0.2.0) + pagy (43.2.8) + json + yaml parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.1) ast (~> 2.4.1) racc - pg (1.5.9) - pp (0.6.2) + pg (1.6.3) + pg (1.6.3-aarch64-linux) + pg (1.6.3-aarch64-linux-musl) + pg (1.6.3-arm64-darwin) + pg (1.6.3-x86_64-linux) + pg (1.6.3-x86_64-linux-musl) + pp (0.6.3) prettyprint premailer (1.27.0) addressable @@ -393,23 +382,24 @@ GEM actionmailer (>= 3) net-smtp premailer (~> 1.7, >= 1.7.9) - pretender (0.5.0) - actionpack (>= 6.1) + pretender (0.6.0) + actionpack (>= 7.1) prettyprint (0.2.0) - prism (1.5.1) - pry (0.15.0) + prism (1.8.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) + reline (>= 0.6.0) pry-rails (0.3.11) pry (>= 0.13.0) - psych (5.2.6) + psych (5.3.1) date stringio - public_suffix (6.0.1) - puma (6.5.0) + public_suffix (7.0.2) + puma (7.2.0) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.3) + rack (3.2.4) rack-proxy (0.7.7) rack rack-session (2.1.1) @@ -417,22 +407,22 @@ GEM rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) - rails (8.0.2.1) - actioncable (= 8.0.2.1) - actionmailbox (= 8.0.2.1) - actionmailer (= 8.0.2.1) - actionpack (= 8.0.2.1) - actiontext (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activemodel (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + rails (8.1.2) + actioncable (= 8.1.2) + actionmailbox (= 8.1.2) + actionmailer (= 8.1.2) + actionpack (= 8.1.2) + actiontext (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activemodel (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) bundler (>= 1.15.0) - railties (= 8.0.2.1) + railties (= 8.1.2) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -440,30 +430,32 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - rails-i18n (8.0.1) + rails-i18n (8.1.0) i18n (>= 0.7, < 2) railties (>= 8.0.0, < 9) rails_autolink (1.1.8) actionview (> 3.1) activesupport (> 3.1) railties (> 3.1) - railties (8.0.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.1) + railties (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.0) - rdoc (6.14.2) + rake (13.3.1) + rdoc (7.1.0) erb psych (>= 4.0.0) - redis-client (0.23.0) + tsort + redis-client (0.26.4) connection_pool regexp_parser (2.11.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) @@ -471,35 +463,35 @@ GEM uber (< 0.2.0) request_store (1.7.0) rack (>= 1.4) - responders (3.1.1) - actionpack (>= 5.2) - railties (>= 5.2) + responders (3.2.0) + actionpack (>= 7.0) + railties (>= 7.0) retriable (3.1.2) rexml (3.4.4) rotp (6.3.0) - rouge (4.5.2) - rqrcode (2.2.0) + rouge (4.7.0) + rqrcode (3.2.0) chunky_png (~> 1.0) - rqrcode_core (~> 1.0) - rqrcode_core (1.2.0) - rspec-core (3.13.2) + rqrcode_core (~> 2.0) + rqrcode_core (2.1.0) + rspec-core (3.13.6) rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) + rspec-mocks (3.13.7) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.1.0) - actionpack (>= 7.0) - activesupport (>= 7.0) - railties (>= 7.0) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.2) - rubocop (1.81.1) + rspec-support (3.13.6) + rubocop (1.82.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -507,86 +499,89 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.47.1, < 2.0) + rubocop-ast (>= 1.48.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.47.1) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) - rubocop-performance (1.23.0) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.27.0) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.34.3) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.3.0) - rubocop (~> 1.61) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) + rubocop-rspec (3.9.0) + lint_roller (~> 1.1) + rubocop (~> 1.81) ruby-progressbar (1.13.0) - ruby-vips (2.2.2) + ruby-vips (2.3.0) ffi (~> 1.12) logger - ruby2_keywords (0.0.5) - rubyXL (3.4.33) + rubyXL (3.4.35) nokogiri (>= 1.10.8) - rubyzip (>= 1.3.0) - rubyzip (2.3.2) + rubyzip (>= 3.2.2) + rubyzip (3.2.2) securerandom (0.4.1) semantic_range (3.1.0) - shakapacker (8.0.2) + shakapacker (9.5.0) activesupport (>= 5.2) package_json rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) - sidekiq (7.3.7) - connection_pool (>= 2.3.0) - logger - rack (>= 2.2.4) - redis-client (>= 0.22.2) - signet (0.19.0) + sidekiq (8.1.0) + connection_pool (>= 3.0.0) + json (>= 2.16.0) + logger (>= 1.7.0) + rack (>= 3.2.0) + redis-client (>= 0.26.0) + signet (0.21.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) + jwt (>= 1.5, < 4.0) multi_json (~> 1.10) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.13.1) + simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) - sqlite3 (2.5.0) - mini_portile2 (~> 2.8.0) - sqlite3 (2.5.0-aarch64-linux-gnu) - sqlite3 (2.5.0-aarch64-linux-musl) - sqlite3 (2.5.0-arm64-darwin) - sqlite3 (2.5.0-x86_64-linux-gnu) - sqlite3 (2.5.0-x86_64-linux-musl) - stringio (3.1.7) - strip_attributes (1.14.1) + sqlite3 (2.9.0-aarch64-linux-gnu) + sqlite3 (2.9.0-aarch64-linux-musl) + sqlite3 (2.9.0-arm64-darwin) + sqlite3 (2.9.0-x86_64-linux-gnu) + sqlite3 (2.9.0-x86_64-linux-musl) + stringio (3.2.0) + strip_attributes (2.0.1) activemodel (>= 3.0, < 9.0) - strscan (3.1.5) - thor (1.4.0) - timeout (0.4.3) + strscan (3.1.7) + thor (1.5.0) + timeout (0.6.0) trailblazer-option (0.1.2) - turbo-rails (2.0.11) - actionpack (>= 6.0.0) - railties (>= 6.0.0) - twitter_cldr (6.12.1) + tsort (0.2.0) + turbo-rails (2.0.21) + actionpack (>= 7.1.0) + railties (>= 7.1.0) + twitter_cldr (6.14.0) + base64 camertron-eprun cldr-plurals-runtime-rb (~> 1.1) tzinfo tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2024.2) + tzinfo-data (1.2025.3) tzinfo (>= 1.0.0) uber (0.1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) - uniform_notifier (1.16.0) + unicode-emoji (4.2.0) + uniform_notifier (1.18.0) uri (1.1.1) useragent (0.16.11) warden (1.2.9) @@ -596,24 +591,24 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.24.0) + webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.9.1) + webrick (1.9.2) websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.3) + yaml (0.4.0) + zeitwerk (2.7.4) PLATFORMS aarch64-linux aarch64-linux-musl arm64-darwin - ruby x86_64-linux x86_64-linux-musl @@ -622,7 +617,7 @@ DEPENDENCIES arabic-letter-connector aws-sdk-s3 aws-sdk-secretsmanager - azure-storage-blob + azure-blob better_html bootsnap brakeman @@ -650,7 +645,7 @@ DEPENDENCIES letter_opener_web lograge mysql2 - numo-narray + numo-narray-alt oj onnxruntime pagy @@ -685,7 +680,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.4.2p28 + ruby 4.0.1 BUNDLED WITH - 2.5.3 + 4.0.3 diff --git a/app/controllers/api/api_base_controller.rb b/app/controllers/api/api_base_controller.rb index 70b992ed..ff01fc8f 100644 --- a/app/controllers/api/api_base_controller.rb +++ b/app/controllers/api/api_base_controller.rb @@ -3,7 +3,7 @@ module Api class ApiBaseController < ActionController::API include ActiveStorage::SetCurrent - include Pagy::Backend + include Pagy::Method DEFAULT_LIMIT = 10 MAX_LIMIT = 100 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 191f1dc8..50823ca7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base BROWSER_LOCALE_REGEXP = /\A\w{2}(?:-\w{2})?/ include ActiveStorage::SetCurrent - include Pagy::Backend + include Pagy::Method check_authorization unless: :devise_controller? @@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base impersonates :user, with: ->(uuid) { User.find_by(uuid:) } - rescue_from Pagy::OverflowError do + rescue_from Pagy::RangeError do redirect_to request.path end @@ -60,7 +60,7 @@ class ApplicationController < ActionController::Base def pagy_auto(collection, **keyword_args) if current_ability.can?(:manage, :countless) - pagy_countless(collection, **keyword_args) + pagy(:countless, collection, **keyword_args) else pagy(collection, **keyword_args) end diff --git a/app/controllers/templates_detect_fields_controller.rb b/app/controllers/templates_detect_fields_controller.rb index 337e8008..56b06cd5 100644 --- a/app/controllers/templates_detect_fields_controller.rb +++ b/app/controllers/templates_detect_fields_controller.rb @@ -13,7 +13,7 @@ class TemplatesDetectFieldsController < ApplicationController documents = @template.schema_documents.preload(:blob) documents = documents.where(uuid: params[:attachment_uuid]) if params[:attachment_uuid].present? - page_number = params[:page].present? ? params[:page].to_i : nil + page_number = params[:page].presence&.to_i documents.each do |document| io = StringIO.new(document.download) diff --git a/app/controllers/timestamp_server_controller.rb b/app/controllers/timestamp_server_controller.rb index d664a976..40db1544 100644 --- a/app/controllers/timestamp_server_controller.rb +++ b/app/controllers/timestamp_server_controller.rb @@ -32,7 +32,7 @@ class TimestampServerController < ApplicationController uri = Addressable::URI.parse(url) conn = Faraday.new(uri.origin) do |c| - c.basic_auth(uri.user, uri.password) if uri.password.present? + c.request :authorization, :basic, uri.user, uri.password if uri.password.present? end response = conn.post(uri.path, req.to_der, diff --git a/app/controllers/webhook_settings_controller.rb b/app/controllers/webhook_settings_controller.rb index 482116ef..f9245f49 100644 --- a/app/controllers/webhook_settings_controller.rb +++ b/app/controllers/webhook_settings_controller.rb @@ -15,7 +15,7 @@ class WebhookSettingsController < ApplicationController @webhook_events = @webhook_events.where(status: params[:status]) if %w[success error].include?(params[:status]) - @pagy, @webhook_events = pagy_countless(@webhook_events.order(id: :desc)) + @pagy, @webhook_events = pagy(:countless, @webhook_events.order(id: :desc)) render :show end @@ -26,7 +26,7 @@ class WebhookSettingsController < ApplicationController @webhook_events = @webhook_events.where(status: params[:status]) if %w[success error].include?(params[:status]) - @pagy, @webhook_events = pagy_countless(@webhook_events.order(id: :desc)) + @pagy, @webhook_events = pagy(:countless, @webhook_events.order(id: :desc)) end def new; end diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index b50c7ac1..a0dfdcfa 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -1,4 +1,3 @@ -<% link = pagy_anchor(pagy) %> <% if pagy.pages > 1 %>