Skip to content

Commit

Permalink
Merge pull request #374 from samvera/fix_build
Browse files Browse the repository at this point in the history
Fix CI build
  • Loading branch information
jrochkind authored Sep 12, 2022
2 parents 5683824 + 5dcf7f5 commit 70fd4f2
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 28 deletions.
38 changes: 19 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,31 @@ workflows:
- bundle_and_test:
name: "ruby3-1_rails6-1"
ruby_version: 3.1.2
rails_version: 6.1.1
rails_version: 6.1.6.1

# Ruby 3.0 release
- bundle_and_test:
name: "ruby3-0_rails6-1"
ruby_version: 3.0.3
rails_version: 6.1.1
rails_version: 6.1.6.1
- bundle_and_test:
name: "ruby3-0_rails6-0"
ruby_version: 3.0.3
rails_version: 6.0.5
rails_version: 6.0.5.1

# Ruby 2.7 release
- bundle_and_test:
name: "ruby2-7_rails6-1"
ruby_version: 2.7.5
rails_version: 6.1.1
rails_version: 6.1.6.1
- bundle_and_test:
name: "ruby2-7_rails6-0"
ruby_version: 2.7.5
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-7_rails5-2"
ruby_version: 2.7.5
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-7_rails5-1"
ruby_version: 2.7.5
Expand All @@ -94,15 +94,15 @@ workflows:
- bundle_and_test:
name: "ruby2-6_rails6-1"
ruby_version: 2.6.9
rails_version: 6.1.1
rails_version: 6.1.6.1
- bundle_and_test:
name: "ruby2-6_rails6-0"
ruby_version: 2.6.9
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-6_rails5-2"
ruby_version: 2.6.9
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-6_rails5-1"
ruby_version: 2.6.9
Expand All @@ -112,15 +112,15 @@ workflows:
- bundle_and_test:
name: "ruby2-5_rails6-1"
ruby_version: 2.5.9
rails_version: 6.1.1
rails_version: 6.1.6.1
- bundle_and_test:
name: "ruby2-5_rails6-0"
ruby_version: 2.5.9
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-5_rails5-2"
ruby_version: 2.5.9
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-5_rails5-1"
ruby_version: 2.5.9
Expand Down Expand Up @@ -150,7 +150,7 @@ workflows:
- bundle_and_test:
name: "ruby3-0_rails6-0"
ruby_version: 3.0.3
rails_version: 6.0.5
rails_version: 6.0.5.1

# Ruby 2.7 release
- bundle_and_test:
Expand All @@ -160,11 +160,11 @@ workflows:
- bundle_and_test:
name: "ruby2-7_rails6-0"
ruby_version: 2.7.5
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-7_rails5-2"
ruby_version: 2.7.5
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-7_rails5-1"
ruby_version: 2.7.5
Expand All @@ -178,11 +178,11 @@ workflows:
- bundle_and_test:
name: "ruby2-6_rails6-0"
ruby_version: 2.6.9
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-6_rails5-2"
ruby_version: 2.6.9
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-6_rails5-1"
ruby_version: 2.6.9
Expand All @@ -196,11 +196,11 @@ workflows:
- bundle_and_test:
name: "ruby2-5_rails6-0"
ruby_version: 2.5.9
rails_version: 6.0.5
rails_version: 6.0.5.1
- bundle_and_test:
name: "ruby2-5_rails5-2"
ruby_version: 2.5.9
rails_version: 5.2.6
rails_version: 5.2.8.1
- bundle_and_test:
name: "ruby2-5_rails5-1"
ruby_version: 2.5.9
Expand Down
15 changes: 14 additions & 1 deletion qa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,20 @@ Gem::Specification.new do |s|
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'
s.add_development_dependency 'linkeddata'

# Not sure why these RDF-related gems are only being listed as development dependencies
# not general runtime dependencies...
# ... maybe meant to be optional dependencies only if you are using related
# func? See also the "meta" gem `linkeddata` which includes all of these deps.
#
# If apps find they need these optional dependencies for linked-data-related
# functionality from qa gem, they may find it easiest to include the `linkeddata`
# aggregator gem as one of their dependencies.
s.add_development_dependency 'rdf-n3', '~> 3.0'
s.add_development_dependency 'rdf-rdfxml', '~> 3.0'
s.add_development_dependency 'json-ld', '~> 3.0'
s.add_development_dependency 'rdf-vocab', '~> 3.0'

s.add_development_dependency 'pry'
s.add_development_dependency 'pry-byebug'
s.add_development_dependency 'rspec-rails'
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/authorities/discogs/generic_authority_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
expect(JSON.parse(results).keys).to match_array ["@context", "@graph"]
expect(JSON.parse(results)["@context"]["bf2"]).to eq("http://id.loc.gov/ontologies/bibframe/")
expect(results).to include("You Go To My Head")
expect(results).to include("Rodgers & Hart")
expect(JSON.parse(results).inspect).to include("Rodgers & Hart")
expect(results).to include("Ray Brown")
expect(results).to include("1952")
expect(results).to include("Single")
Expand Down
8 changes: 7 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
require 'linkeddata'
# Not sure why these RDF-related gems are only being used in CI and not general
# dependencies... maybe meant to be optional dependencies?
require 'rdf/n3'
require 'rdf/rdfxml'
require 'json/ld'
require 'rdf/vocab'

require 'json'
require 'engine_cart'
require 'byebug' unless ENV['TRAVIS']
Expand Down
18 changes: 12 additions & 6 deletions spec/test_app_templates/Gemfile.extra
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Use this file to reference specific commits of gems.


group :development do
gem 'linkeddata'
if ENV['RAILS_VERSION'] =~ /^6\.1\./ && ENV['RUBY_VERSION'] =~ /^3\.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
# Rails < 6.1 are not compatible with psych 4, although doesn't know it.
# Local apps using old Rails will have to lock locally. Latest versions
# of Rails 6.1+ has been updated to work with psych 4.
# See also:
#
# https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias/71192990#71192990
#
if ENV['RAILS_VERSION'] && Gem::Version.new(ENV['RAILS_VERSION']) < Gem::Version.new("6.1")
gem 'psych', '< 4'
end

if ENV['RAILS_VERSION'] =~ /^6\.1\./ && ENV['RUBY_VERSION'] =~ /^3\.1\./
# 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
Expand Down

0 comments on commit 70fd4f2

Please sign in to comment.