Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Rails 6.1 to 7.0 and Ruby 3.0 #653

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: ruby/setup-ruby@v1
- uses: actions/setup-node@v1
with:
node-version: '14'
node-version: '16'
- name: Cache ruby gems
uses: actions/cache@v4
with:
Expand All @@ -63,8 +63,8 @@ jobs:
echo "gem: --no-document" > ~/.gemrc
gem install bundler --conservative
bundle config path vendor/bundle
bin/setup
bundle exec rails spec
bundle install
bundle exec rails db:create db:schema:load spec
- name: Run Rubocop
run: bundle exec rubocop
- name: Run eslint
Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ruby 2.7.5
ruby 3.0.7
nodejs 16.20.2
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7
FROM ruby:3.0.7

RUN curl -sS https://deb.nodesource.com/setup_16.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
Expand All @@ -10,7 +10,7 @@ ENV RAILS_ENV production
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

RUN gem install bundler:2.2.32
RUN gem install bundler:2.3.10
ADD Gemfile* $APP_HOME/
RUN bundle install --without development test

Expand Down
18 changes: 10 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

source 'https://rubygems.org'

ruby '~> 2.7'
ruby '~> 3.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.4'
gem 'rails', '~> 7.0.0'
# TODO: Remove this once upgrading to Rails 7.1, this is required for a bug specific to Rails 7.0
gem 'concurrent-ruby', '1.3.4'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
Expand Down Expand Up @@ -61,6 +63,8 @@ gem 'fast_excel'
# For writing excel files
gem 'ruh-roo', '~> 3.0.0', require: 'roo'

gem 'rexml'

gem 'ox'

gem 'rubyzip'
Expand All @@ -69,22 +73,19 @@ gem 'mitre-inspec-objects'
gem 'rest-client'

group :development do
gem 'listen', '~> 3.1.5'
gem 'listen'
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'letter_opener'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'spring-watcher-listen'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'capybara'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
# gem 'webdrivers'

gem 'database_cleaner-active_record'
gem 'rubocop', require: false
gem 'rubocop-performance'
Expand All @@ -95,6 +96,7 @@ end
group :development, :test do
gem 'brakeman'
gem 'byebug'
gem 'pry'
gem 'factory_bot_rails', '~> 5.2.0'
gem 'rspec-mocks'
gem 'rspec-rails', '~> 4.0.0'
Expand Down
Loading
Loading