Skip to content

Commit

Permalink
Merge pull request #661 from CDLUC3/feature/BR-rails7
Browse files Browse the repository at this point in the history
Upgrade to Rails 7.2
  • Loading branch information
briri authored Nov 19, 2024
2 parents 48f592d + 950585b commit deecfa0
Show file tree
Hide file tree
Showing 322 changed files with 4,337 additions and 4,155 deletions.
3 changes: 0 additions & 3 deletions .env.mysql2
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ DMPROADMAP_HOST=localhost
CHROMIUM_PATH=/usr/bin/chromium

# Database settings.
DMPROADMAP_DATABASE_HOST=127.0.01
DMPROADMAP_DATABASE_ADAPTER=mysql2
DMPROADMAP_DATABASE_NAME=dmp
DMPROADMAP_DATABASE_PORT=3306
DMPROADMAP_DATABASE_POOL_SIZE=16

# Whether or not the Dragonfly gem should use AWS S3 to store logos. If 'false' the logos will
Expand Down
3 changes: 0 additions & 3 deletions .env.postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ DMPROADMAP_HOST=localhost
CHROMIUM_PATH=/usr/bin/chromium

# Database settings.
DMPROADMAP_DATABASE_HOST=127.0.01
DMPROADMAP_DATABASE_ADAPTER=postgresql
DMPROADMAP_DATABASE_NAME=dmp
DMPROADMAP_DATABASE_PORT=5432
DMPROADMAP_DATABASE_POOL_SIZE=16

# Whether or not the Dragonfly gem should use AWS S3 to store logos. If 'false' the logos will
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.*-env
.env.dev
env.dev*
.env.master
.set_env.sh
# Ignore init Rake task used by Docker
lib/tasks/init.rake
Expand Down
35 changes: 19 additions & 16 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@ RUN groupadd -g 1000 dmpt && useradd -u 1000 -g 1000 dmpt
# they were clobbered by a parent image.
RUN set -ex \
&& RUN_DEPS=" \
apt-transport-https autoconf automake build-essential ca-certificates chromium curl \
dumb-init fonts-liberation gawk g++ gconf-service git imagemagick \
libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libcurl4-gnutls-dev \
libdbus-1-3 libexpat1 libffi-dev libfontconfig1 libgdbm-dev libgbm1 libgcc1 \
libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libmariadb-dev \
libnspr4 libnss3 libreadline-dev libpango-1.0-0 libpangocairo-1.0-0 \
libssl-dev libstdc++6 libtool libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxss1 libxtst6 libyaml-dev locales lsb-release mtr \
shared-mime-info tzdata vim wget xdg-utils xfonts-base \
xfonts-75dpi xz-utils yarn \
nodejs -qqy \
apt-transport-https autoconf automake build-essential ca-certificates chromium curl \
dumb-init fonts-liberation gawk g++ gconf-service git imagemagick \
libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libcurl4-gnutls-dev \
libdbus-1-3 libexpat1 libffi-dev libfontconfig1 libgdbm-dev libgbm1 libgcc1 \
libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libmariadb-dev \
libnspr4 libnss3 libreadline-dev libpango-1.0-0 libpangocairo-1.0-0 \
libssl-dev libstdc++6 libtool libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxss1 libxtst6 libyaml-dev locales lsb-release mtr \
shared-mime-info tzdata vim wget xdg-utils xfonts-base \
xfonts-75dpi xz-utils yarn \
python3 make \
nodejs -qqy \
" \
&& seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{} \
&& apt-get update && apt-get install -y --no-install-recommends $RUN_DEPS \
&& rm -rf /var/lib/apt/lists/*

# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -
RUN apt-get install -y nodejs

# Install yarn
Expand All @@ -51,9 +52,12 @@ RUN gem install bundler -v 2.5
RUN gem install foreman
RUN bundle config without pgsql rollbar
RUN bundle install
RUN yarn install

# RUN npx puppeteer browsers install chrome
# Install parcel watcher locally so that it has the correct build
# RUN npm i -g node-gyp
# RUN yarn add @parcel/watcher --save-dev
# RUN yarn add @parcel/watcher-linux-arm64-glibc --save-dev
RUN yarn install

# Install the fonts needed by Puppeteer to generate PDFs
RUN mkdir -p /home/dmpt/.local/share/fonts
Expand All @@ -66,5 +70,4 @@ USER dmpt
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# EXPOSE 25 80 443
# CMD ["bundle", "exec", "puma", "-C", "config/puma.rb", "-p", "80"]
CMD ["echo", "Ready…"]
31 changes: 17 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

source 'https://rubygems.org'

ruby '>= 3.0'
ruby '>= 3.2'

# ===========#
# CORE RAILS #
# ===========#

# Full-stack web application framework. (http://rubyonrails.org)
gem 'rails', '~> 6.1'
gem 'rails', '~> 7.2'

# TODO: Remove this once Rails addresses the issue with its dependency on mimemagic. Mimemagic had
# an MIT license but was using some incompatible GPL license code.
Expand All @@ -36,6 +36,14 @@ gem 'turbo-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'

# The ultimate text progress bar library for Ruby!
# (https://github.com/jfelchner/ruby-progressbar)
gem 'ruby-progressbar'

# Provides Sprockets implementation for Rails 4.x (and beyond) Asset Pipeline.
# https://github.com/rails/sprockets-rails
gem 'sprockets-rails'

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
# Use Active Model has_secure_password
Expand Down Expand Up @@ -83,14 +91,14 @@ gem 'rollbar', group: :rollbar, require: false

# A simple, fast Mysql library for Ruby, binding to libmysql
# (http://github.com/brianmario/mysql2)
gem 'mysql2', "0.5.6", group: :mysql, require: false
gem 'mysql2'

# Pg is the Ruby interface to the {PostgreSQL
# RDBMS}[http://www.postgresql.org/](https://bitbucket.org/ged/ruby-pg)
gem 'pg', group: :pgsql, require: false

# Bit fields for ActiveRecord (https://github.com/pboling/flag_shih_tzu)
gem 'flag_shih_tzu' # , "~> 0.3.23"
gem 'flag_shih_tzu'

# ======== #
# SECURITY #
Expand Down Expand Up @@ -135,7 +143,7 @@ gem 'jwt'
gem 'pundit'

# Gem for throttling malicious attacks
gem 'rack-attack', '~> 6.6', '>= 6.6.1'
gem 'rack-attack'

# Support for Cross-Origin Resource Sharing (CORS) for Rack compatible web applications.
# https://github.com/cyu/rack-cors
Expand Down Expand Up @@ -245,10 +253,9 @@ gem 'activerecord_json_validator'
# user input (we're using it for PDF invoice downloads in Noko). (https://github.com/madrobby/zaru)
gem 'zaru'

# We need to freeze the mail gem version as the recently released 2.8.0 triggers an exception
# We will need to check if it's fixed when we migrate to Ruby 3.0/3.1
# See : https://github.com/DMPRoadmap/roadmap/issues/3254
gem 'mail', '2.7.1'
# Mail is an internet library for Ruby that is designed to handle email generation, parsing and sending in
# a simple, rubyesque manner.
gem 'mail'

# Delayed::Job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background.
# See: https://github.com/collectiveidea/delayed_job#active-job
Expand Down Expand Up @@ -299,10 +306,6 @@ group :ci, :development do
# the community-driven Ruby Style Guide.
gem 'rubocop'

# RuboCop rules for detecting and autocorrecting undecorated strings for i18n
# (gettext and rails-i18n)
gem 'rubocop-i18n'

# A collection of RuboCop cops to check for performance optimizations in Ruby code.
# gem 'rubocop-performance'

Expand Down Expand Up @@ -400,7 +403,7 @@ group :development do

# TODO: Unlock this version once the Rails load error is fixed:
# https://github.com/BetterErrors/better_errors/issues/523
gem 'better_errors', '2.9.1'
gem 'better_errors'

# Retrieve the binding of a method's caller. Can also retrieve bindings
# even further up the stack. (http://github.com/banister/binding_of_caller)
Expand Down
Loading

0 comments on commit deecfa0

Please sign in to comment.