Skip to content

Commit aa38773

Browse files
authored
Merge from docusealco/wip
2 parents b3e72f0 + 96530bd commit aa38773

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3049
-1212
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Ruby
1313
uses: ruby/setup-ruby@v1
1414
with:
15-
ruby-version: 3.4.2
15+
ruby-version: 4.0.1
1616
- name: Cache gems
1717
uses: actions/cache@v4
1818
with:
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install Ruby
3838
uses: ruby/setup-ruby@v1
3939
with:
40-
ruby-version: 3.4.2
40+
ruby-version: 4.0.1
4141
- name: Cache gems
4242
uses: actions/cache@v4
4343
with:
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install Node.js
6363
uses: actions/setup-node@v1
6464
with:
65-
node-version: 20.9.0
65+
node-version: 20.19.0
6666
- name: Cache directory path
6767
id: yarn-cache-dir-path
6868
run: echo "::set-output name=dir::$(yarn cache dir)"
@@ -89,7 +89,7 @@ jobs:
8989
- name: Install Ruby
9090
uses: ruby/setup-ruby@v1
9191
with:
92-
ruby-version: 3.4.2
92+
ruby-version: 4.0.1
9393
- name: Cache gems
9494
uses: actions/cache@v4
9595
with:
@@ -132,11 +132,11 @@ jobs:
132132
- name: Install Ruby
133133
uses: ruby/setup-ruby@v1
134134
with:
135-
ruby-version: 3.4.2
135+
ruby-version: 4.0.1
136136
- name: Set up Node
137137
uses: actions/setup-node@v1
138138
with:
139-
node-version: 20.9.0
139+
node-version: 20.19.0
140140
- name: Install Chrome
141141
uses: browser-actions/setup-chrome@latest
142142
with:

.rubocop.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require:
1+
plugins:
22
- rubocop-performance
33
- rubocop-rails
44
- rubocop-rspec
@@ -10,7 +10,7 @@ AllCops:
1010
- node_modules/**/*
1111
- bin/*
1212
- vendor/**/*
13-
TargetRubyVersion: '3.3'
13+
TargetRubyVersion: '4.0'
1414
SuggestExtensions: false
1515

1616
Metrics/BlockLength:
@@ -100,3 +100,9 @@ Rails/ApplicationController:
100100

101101
Rails/Output:
102102
Enabled: false
103+
104+
Rails/StrongParametersExpect:
105+
Enabled: false
106+
107+
Rails/RedirectBackOrTo:
108+
Enabled: false

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.4.2-alpine AS download
1+
FROM ruby:4.0.1-alpine AS download
22

33
WORKDIR /fonts
44

@@ -9,14 +9,14 @@ RUN apk --no-cache add fontforge wget && \
99
wget https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansSymbols2/hinted/ttf/NotoSansSymbols2-Regular.ttf && \
1010
wget https://github.com/Maxattax97/gnu-freefont/raw/master/ttf/FreeSans.ttf && \
1111
wget https://github.com/impallari/DancingScript/raw/master/OFL.txt && \
12-
wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.1.0/model_704_int8.onnx" && \
12+
wget -O /model.onnx "https://github.com/docusealco/fields-detection/releases/download/2.0.0/model_704_int8.onnx" && \
1313
wget -O pdfium-linux.tgz "https://github.com/docusealco/pdfium-binaries/releases/latest/download/pdfium-linux-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/').tgz" && \
1414
mkdir -p /pdfium-linux && \
1515
tar -xzf pdfium-linux.tgz -C /pdfium-linux
1616

1717
RUN fontforge -lang=py -c 'font1 = fontforge.open("FreeSans.ttf"); font2 = fontforge.open("NotoSansSymbols2-Regular.ttf"); font1.mergeFonts(font2); font1.generate("FreeSans.ttf")'
1818

19-
FROM ruby:3.4.2-alpine AS webpack
19+
FROM ruby:4.0.1-alpine AS webpack
2020

2121
ENV RAILS_ENV=production
2222
ENV NODE_ENV=production
@@ -42,7 +42,7 @@ COPY ./app/views ./app/views
4242

4343
RUN echo "gem 'shakapacker'" > Gemfile && ./bin/shakapacker
4444

45-
FROM ruby:3.4.2-alpine AS app
45+
FROM ruby:4.0.1-alpine AS app
4646

4747
ENV RAILS_ENV=production
4848
ENV BUNDLE_WITHOUT="development:test"
@@ -51,7 +51,7 @@ ENV OPENSSL_CONF=/etc/openssl_legacy.cnf
5151

5252
WORKDIR /app
5353

54-
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
54+
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
5555

5656
RUN addgroup -g 2000 docuseal && adduser -u 2000 -G docuseal -s /bin/sh -D -h /home/docuseal docuseal
5757

@@ -71,8 +71,6 @@ COPY --chown=docuseal:docuseal ./Gemfile ./Gemfile.lock ./
7171

7272
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")
7373

74-
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
75-
7674
COPY --chown=docuseal:docuseal ./bin ./bin
7775
COPY --chown=docuseal:docuseal ./app ./app
7876
COPY --chown=docuseal:docuseal ./config ./config

Gemfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
source 'https://rubygems.org'
44

5-
ruby '3.4.2'
5+
ruby '4.0.1'
66

7-
gem 'arabic-letter-connector', require: 'arabic-letter-connector/logic'
7+
gem 'arabic-letter-connector', require: false
88
gem 'aws-sdk-s3', require: false
99
gem 'aws-sdk-secretsmanager', require: false
10-
gem 'azure-storage-blob', require: false
10+
gem 'azure-blob', require: false
1111
gem 'bootsnap', require: false
1212
gem 'cancancan'
13-
gem 'csv'
14-
gem 'csv-safe'
13+
gem 'csv', require: false
14+
gem 'csv-safe', require: false
1515
gem 'devise'
1616
gem 'devise-two-factor'
1717
gem 'dotenv', require: false
@@ -21,12 +21,12 @@ gem 'faraday-follow_redirects'
2121
gem 'google-cloud-storage', require: false
2222
gem 'hexapdf'
2323
gem 'image_processing'
24-
gem 'jwt'
24+
gem 'jwt', require: false
2525
gem 'lograge'
2626
gem 'mysql2', require: false
27-
gem 'numo-narray'
27+
gem 'numo-narray-alt', require: false
2828
gem 'oj'
29-
gem 'onnxruntime'
29+
gem 'onnxruntime', require: false
3030
gem 'pagy'
3131
gem 'pg', require: false
3232
gem 'premailer-rails'
@@ -38,9 +38,9 @@ gem 'rails_autolink'
3838
gem 'rails-i18n'
3939
gem 'rotp'
4040
gem 'rouge', require: false
41-
gem 'rqrcode'
41+
gem 'rqrcode', require: false
4242
gem 'ruby-vips'
43-
gem 'rubyXL'
43+
gem 'rubyXL', require: false
4444
gem 'shakapacker'
4545
gem 'sidekiq'
4646
gem 'sqlite3', require: false

0 commit comments

Comments
 (0)