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 to Rails 6.1 #5057

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
97aa9f0
WIP
cjcolvar Dec 19, 2022
84525d9
Naively change EBUCore.locator to EBUCore.Locator
cjcolvar Dec 19, 2022
6e5bc26
Naively change EBUCore.filename to EBUCore.resourceFilename
cjcolvar Dec 19, 2022
8f7d0cf
Apply same changes to Derivative model
cjcolvar Dec 19, 2022
9129c76
Naively change EBUCore.identifier to EBUCore.Identifier
cjcolvar Dec 19, 2022
d5c1fdd
Test with ruby3 image
cjcolvar Dec 19, 2022
98d84a9
Add missing net-smtp dependency
cjcolvar Dec 19, 2022
50c18a9
Pin psych to < 4
cjcolvar Dec 19, 2022
03df680
Upgrade webmock
cjcolvar Dec 19, 2022
fbe2a09
Use ActiveTriples branch for compatibility with newer ruby-rdf
cjcolvar Dec 20, 2022
f5c5f2b
Use patched fork of edtf-ruby
cjcolvar Jan 9, 2023
42127a5
Revert directory changes
cjcolvar Jan 9, 2023
3500bf5
Use released versions of samvera gems (except om which is deprecated …
cjcolvar Jan 30, 2023
b35e015
Test with ruby 3.2
cjcolvar Jan 30, 2023
f1f04d9
Add back in noid-rails dependency
cjcolvar Jan 30, 2023
8497c20
Use released version of edtf-ruby
cjcolvar Jan 31, 2023
9224dab
Upgrade sinatra for security patch
cjcolvar Jan 31, 2023
473daba
Configure git to allow root to checkout repo
cjcolvar Jan 31, 2023
1998305
Test with rails 6.1
cjcolvar Feb 7, 2023
9a73955
Fix mediainfo fork
cjcolvar Feb 7, 2023
8cd919d
Upgrade pry
cjcolvar Feb 7, 2023
fb1e490
Updated samvera-persona
cjcolvar Feb 7, 2023
b86fb28
File#exists? -> File#exist?
cjcolvar Feb 7, 2023
47117f7
Fix rspec-rails config
cjcolvar Feb 8, 2023
f06c1de
Mark order query as safe SQL
cjcolvar Feb 8, 2023
6af2d53
Dir#exists? -> Dir#exist?
cjcolvar Feb 8, 2023
316bca8
Don't modify frozen string, overwrite it
cjcolvar Feb 8, 2023
41ee7e1
Ensure params are strings instead of arrays
cjcolvar Feb 8, 2023
98fb1c7
Fix issue with missing fixture_file_path method
cjcolvar Feb 8, 2023
4049e9d
Run rails app:update
cjcolvar Feb 8, 2023
f1420bf
Use a non-null cache since some tests require it
cjcolvar Feb 8, 2023
4ef3ca6
Explicitly make kwargs into hash for rspec
cjcolvar Feb 8, 2023
373145f
Avoid negative truncation values
cjcolvar Feb 8, 2023
407433c
Use active_fedora branch with fix; not sure why rdf-ldp was regressed
cjcolvar Feb 8, 2023
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
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
docker:
# Primary container image where all steps run.
- image: avalonmediasystem/avalon:7.3.0-dev
- image: avalonmediasystem/avalon:7.5.0-dev-ruby3
environment:
- DATABASE_URL=postgresql://postgres@localhost:5432/postgres
- FEDORA_URL=http://localhost:8080/fcrepo/rest
Expand All @@ -31,7 +31,7 @@ jobs:
parameters:
ruby_ver:
description: 'Ruby version'
default: '2.7'
default: '3.1'
type: 'string'
solr_port:
type: string
Expand All @@ -55,6 +55,7 @@ jobs:
name: Clean out existing code
command: rm -rf .[!.]* *

- run: git config --global --add safe.directory /home/app/avalon
- samvera/cached_checkout

- run: cp config/controlled_vocabulary.yml.example config/controlled_vocabulary.yml
Expand Down Expand Up @@ -138,7 +139,7 @@ jobs:
default: 4
docker:
# Primary container image where all steps run.
- image: avalonmediasystem/avalon:7.3.0-dev
- image: avalonmediasystem/avalon:7.5.0-dev-ruby3

working_directory: /home/app/avalon

Expand All @@ -161,10 +162,10 @@ workflows:
build_test_report:
jobs:
- build:
ruby_ver: '2.7'
name: 'Ruby2-7'
ruby_ver: '3.2'
name: 'Ruby3-2'
parallelism: 4
- upload-coverage:
parallelism: 4
requires:
- Ruby2-7
- Ruby3-2
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base stage for building gems
FROM ruby:2.7-bullseye as bundle
FROM ruby:3.1-bullseye as bundle
LABEL stage=build
LABEL project=avalon
RUN apt-get update && apt-get upgrade -y build-essential && apt-get autoremove \
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN bundle config set --local without 'production' \


# Download binaries in parallel
FROM ruby:2.7-bullseye as download
FROM ruby:3.1-bullseye as download
LABEL stage=build
LABEL project=avalon
RUN curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz | tar xvz -C /usr/bin/
Expand All @@ -43,7 +43,7 @@ RUN apt-get -y update && apt-get install -y ffmpeg


# Base stage for building final images
FROM ruby:2.7-slim-bullseye as base
FROM ruby:3.1-slim-bullseye as base
LABEL stage=build
LABEL project=avalon
RUN echo "deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free" > /etc/apt/sources.list.d/bullseye.list \
Expand Down
24 changes: 14 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ source 'https://rubygems.org'
# Core rails
gem 'bootsnap', require: false
gem 'listen'
gem 'rails', '=6.0.5.1'
gem 'net-smtp', require: false
gem 'psych', '< 4'
gem 'rails', '=6.1.7.2'
gem 'sprockets', '~>3.7.2'
#gem 'sprockets-rails', require: 'sprockets/railtie'
gem 'sqlite3'
Expand All @@ -25,13 +27,14 @@ gem 'uglifier', '>= 1.3.0'
gem 'webpacker'

# Core Samvera
gem 'active-fedora', '~> 13.2', '>= 13.2.5'
gem 'active_fedora-datastreams', '~> 0.4'
#gem 'active-fedora', '~> 14.0'
gem 'active-fedora', git: "https://github.com/samvera/active_fedora.git", branch: "errors_fix"
gem 'active_fedora-datastreams', '~> 0.5'
gem 'hydra-head', '~> 12.0'
gem 'ldp', '~> 1.0.3'
gem 'noid-rails', '~> 3.0.1'
gem 'ldp', '~> 1.1.0'
gem 'noid-rails', '~> 3.1'
gem 'om', git: 'https://github.com/avalonmediasystem/om.git', branch: 'ruby3'
gem 'rdf-rdfxml'
gem 'rdf-vocab', '< 3.1.5'

# Samvera version pins
gem 'blacklight', '~> 7.25'
Expand All @@ -53,7 +56,8 @@ gem 'iiif_manifest', '~> 0.6'
gem 'rack-cors', require: 'rack/cors'
gem 'rails_same_site_cookie'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'samvera-persona', '~> 0.3'
#gem 'samvera-persona', '~> 0.3'
gem 'samvera-persona', git: "https://github.com/samvera-labs/samvera-persona.git", branch: "newer_rails"
gem 'speedy-af', '~> 0.3'

# Avalon Components
Expand All @@ -75,13 +79,13 @@ gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform'
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon'
gem 'fastimage'
gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5'
gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", branch: 'avalon_fixes'
gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", branch: 'rails6.1'
gem 'rest-client', '~> 2.0'
gem 'roo'
gem 'wavefile', '~> 1.0.1'

# Data Translation & Normalization
gem 'edtf'
gem 'edtf', '>= 3.1.1'
gem 'iconv', '~> 1.0.6'
gem 'marc'

Expand Down Expand Up @@ -142,7 +146,7 @@ group :test do
gem 'shoulda-matchers'
gem 'simplecov'
gem 'webdrivers', '~> 3.0'
gem 'webmock', '~> 3.5.1'
gem 'webmock', '~> 3.5'
end

group :production do
Expand Down
Loading