Skip to content

Commit

Permalink
Rails 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eddierubeiz committed Jul 13, 2022
1 parent 9122480 commit 85bc5f1
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 17 deletions.
62 changes: 50 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,47 @@ jobs:

- samvera/parallel_rspec



workflows:
ci:
jobs:
# Ruby 3.1 release
- bundle_and_test:
name: "ruby3-1_rails6-1"
ruby_version: 3.1.2
rails_version: 6.1.1
- bundle_and_test:
name: "ruby3-1_rails6-0"
ruby_version: 3.1.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby3-1_rails5-2"
ruby_version: 3.1.2
rails_version: 5.2.6
- bundle_and_test:
name: "ruby3-1_rails5-1"
ruby_version: 3.1.2
rails_version: 5.1.7

# Ruby 3.0 release
- bundle_and_test:
name: "ruby3-0_rails6-1"
ruby_version: 3.0.0
rails_version: 6.1.1
- bundle_and_test:
name: "ruby3-0_rails6-0"
ruby_version: 3.0.0
rails_version: 6.0.5
- bundle_and_test:
name: "ruby3-0_rails5-2"
ruby_version: 3.0.0
rails_version: 5.2.6
- bundle_and_test:
name: "ruby3-0_rails5-1"
ruby_version: 3.0.0
rails_version: 5.1.7

# Ruby 2.7 release
- bundle_and_test:
name: "ruby2-7_rails6-1"
Expand All @@ -62,11 +100,11 @@ workflows:
- bundle_and_test:
name: "ruby2-7_rails6-0"
ruby_version: 2.7.5
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-7_rails5-2"
ruby_version: 2.7.5
rails_version: 5.2.4
rails_version: 5.2.6
- bundle_and_test:
name: "ruby2-7_rails5-1"
ruby_version: 2.7.5
Expand All @@ -80,11 +118,11 @@ workflows:
- bundle_and_test:
name: "ruby2-6_rails6-0"
ruby_version: 2.6.9
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-6_rails5-2"
ruby_version: 2.6.9
rails_version: 5.2.4
rails_version: 5.2.6
- bundle_and_test:
name: "ruby2-6_rails5-1"
ruby_version: 2.6.9
Expand All @@ -94,15 +132,15 @@ workflows:
- bundle_and_test:
name: "ruby2-5_rails6-1"
ruby_version: 2.5.9
rails_version: 6.1.0
rails_version: 6.1.1
- bundle_and_test:
name: "ruby2-5_rails6-0"
ruby_version: 2.5.9
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-5_rails5-2"
ruby_version: 2.5.9
rails_version: 5.2.4
rails_version: 5.2.6
- bundle_and_test:
name: "ruby2-5_rails5-1"
ruby_version: 2.5.9
Expand All @@ -126,11 +164,11 @@ workflows:
- bundle_and_test:
name: "ruby2-7_rails6-0"
ruby_version: 2.7.5
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-7_rails5-2"
ruby_version: 2.7.5
rails_version: 5.2.4
rails_version: 5.2.6
- bundle_and_test:
name: "ruby2-7_rails5-1"
ruby_version: 2.7.5
Expand All @@ -144,7 +182,7 @@ workflows:
- bundle_and_test:
name: "ruby2-6_rails6-0"
ruby_version: 2.6.9
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-6_rails5-2"
ruby_version: 2.6.9
Expand All @@ -158,11 +196,11 @@ workflows:
- bundle_and_test:
name: "ruby2-5_rails6-1"
ruby_version: 2.5.9
rails_version: 6.1.0
rails_version: 6.1.1
- bundle_and_test:
name: "ruby2-5_rails6-0"
ruby_version: 2.5.9
rails_version: 6.0.2
rails_version: 6.0.5
- bundle_and_test:
name: "ruby2-5_rails5-2"
ruby_version: 2.5.9
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inherit_gem:
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1
DisplayCopNames: true
Exclude:
- 'db/**/*'
Expand All @@ -21,6 +21,9 @@ Metrics/BlockLength:
- 'qa.gemspec'
- 'spec/**/*.rb'

Style/HashSyntax:
Enabled: false

# By default RSpec/MessageSpies has the following:
# Prefer have_received for setting message expectations. Setup form as a spy using allow or instance_spy.
# The default assumes EnforcedStyle is 'have_received'. Most of our specs are 'receive'
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ If you're working on PR for this project, create a feature branch off of `main`.
This repository follows the [Samvera Community Code of Conduct](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct) and [language recommendations](https://github.com/samvera/maintenance/blob/main/templates/CONTRIBUTING.md#language). Please ***do not*** create a branch called `master` for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.

## Compatibility

- Ruby 2.5 or the latest 2.4 version is recommended. Later versions may also work.
- Rails 5 is required. We recommend the latest Rails 5.2 release.
This code works with the latest versions of:
- Rails 6.1, 6.0, 5.2 and 5.1.
- Ruby 3.0, 2.6, and 2.5.
- You can also use Ruby 3.1, but the combination of Ruby 3.1 and Rails 6.1 comes with a caveat: your app will not be able to use `psych 4` (which ordinarily comes with 3.1). See https://bugs.ruby-lang.org/issues/17866 and https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias/71192990#71192990 for an explanation. One workaround is to modify your app's `Gemfile` to hold back `psych`: `gem 'psych', '< 4'`.
See also `.circleci/config.yml`.

## Product Owner & Maintenance

Expand Down
2 changes: 1 addition & 1 deletion qa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_dependency 'rdf'

# the hyrax style guide is based on `bixby`. see `.rubocop.yml`
s.add_development_dependency 'bixby', '~> 3.0.0'
s.add_development_dependency 'bixby', '~> 5.0', '>= 5.0.2' # bixby 5 briefly dropped Ruby 2.5
s.add_development_dependency 'rails', '!=5.2.0', '!=5.2.1', '!=5.2.2'
s.add_development_dependency 'byebug'
s.add_development_dependency 'engine_cart', '~> 2.0'
Expand Down
13 changes: 13 additions & 0 deletions spec/test_app_templates/Gemfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@

group :development do
gem 'linkeddata'

case ENV['RAILS_VERSION']
when /^6\.1\./
# Ruby 3.0 comes with Psych 3, while Ruby 3.1 comes with Psych 4,
# which has a major breaking change (diff 3.3.2 → 4.0.0).
# See: https://bugs.ruby-lang.org/issues/17866
# See also: https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias/71192990#71192990
gem 'psych', '< 4'
# opt into mail 2.8.0.rc1 so we get extra dependencies
# Once mail 2.8.0 final is released this will not be required.
# https://github.com/mikel/mail/pull/1472
gem "mail", ">= 2.8.0.rc1"
end
end

0 comments on commit 85bc5f1

Please sign in to comment.