Skip to content

Commit

Permalink
Merge pull request #55 from TuftsUniversity/ruby-upgrade
Browse files Browse the repository at this point in the history
Ruby 3 Upgrade
  • Loading branch information
rawOrlando committed Dec 4, 2023
2 parents c8a5e4d + d8e4215 commit 08aa850
Show file tree
Hide file tree
Showing 33 changed files with 729 additions and 318 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.7.5']
ruby-version: ['3.2.2']
experimental: [false]
#include:
# - ruby-version: 2.6
Expand All @@ -45,12 +45,12 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: "2.1.4"
bundler: "2.4.19"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Update rubygems
run: |
gem update --system
gem install bundler:2.1.4
gem install bundler:2.4.19
- name: Set up JDK 1.8
uses: actions/setup-java@v1
Expand Down Expand Up @@ -78,9 +78,9 @@ jobs:
run: |
RAILS_ENV=test bundle exec rake db:create
RAILS_ENV=test bundle exec rake db:migrate --trace
# - name: Rubbocop
# run: |
# bundle exec rubocop
- name: Rubbocop
run: |
bundle exec rubocop
- name: Compile assets
run: |
bundle exec rails assets:precompile --trace
Expand Down
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.5
FROM ruby:3.2.2

ARG RAILS_ENV
ARG SECRET_KEY_BASE
Expand All @@ -13,17 +13,20 @@ ENV LC_ALL C.UTF-8
# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# --allow-unauthenticated needed for yarn package
RUN apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends -y ca-certificates nodejs \
build-essential libpq-dev unzip vim \
libqt5webkit5-dev xvfb xauth default-jre-headless --fix-missing --allow-unauthenticated
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install build-essential -y
RUN apt-get install --no-install-recommends -y ca-certificates nodejs
# RUN apt-get install vim
RUN apt-get install --no-install-recommends -y build-essential libpq-dev unzip vim
RUN apt-get install --no-install-recommends -y libqt5webkit5-dev xvfb xauth default-jre-headless --fix-missing --allow-unauthenticated

RUN apt-get install chromium -y

# Increase stack size limit to help working with large works
ENV RUBY_THREAD_MACHINE_STACK_SIZE 8388608

#RUN gem update --system
RUN gem update --system

RUN mkdir /data
WORKDIR /data
Expand Down
27 changes: 20 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
# frozen_string_literal: true
source 'https://rubygems.org'

ruby '2.7.5'
ruby '3.2.2'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

gem 'rails', '5.2.8'
gem 'rails', '7.0.2'

gem 'jquery-rails'
gem 'sass-rails'
gem 'uglifier'

gem 'blacklight', '6.24.0'
gem 'blacklight_range_limit'
gem 'blacklight', '7.24.0'
# pinned to not move to version 8, which breaks our custom javascript
gem 'blacklight_range_limit', '7.8.0'

# removed pinned verision of '~> 0.4.10'
gem 'mysql2'
gem 'okcomputer'
gem 'rsolr', '>= 1.0'

gem 'qa'
gem 'riiif'

# Matching MIRA's versions
gem 'active-fedora', '12.2.4'
# change active-fedora version
gem 'active-fedora', '14.0.0'
gem 'active_fedora-noid'

# previously prepackaged gems in ruby 2
gem 'http'
gem 'puma'
gem 'thin'

group :production do
gem 'passenger'
end
Expand All @@ -43,8 +49,15 @@ group :development, :test do
gem 'rspec-rails'
gem 'simplecov'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'webrick'
end

group :test do
gem 'solr_wrapper', '>= 0.3'
gem "solr_wrapper", ">= 0.3"
end

gem "rsolr", ">= 1.0", "< 3"

gem "bootstrap", "~> 4.0"
gem "sassc-rails", "~> 2.1"
gem "twitter-typeahead-rails", "0.11.1.pre.corejavascript"
Loading

0 comments on commit 08aa850

Please sign in to comment.