From ab1d5aedcb6a0162fe7ff45b47979e2601821adc Mon Sep 17 00:00:00 2001 From: Jonathan Rochkind Date: Thu, 8 Sep 2022 12:45:40 -0400 Subject: [PATCH] only depend on specific components of linkeddata being used To avoid dependency conflicts with sub-dependencies of linkeddata not being used. linkeddata is a meta gem that just aggregates a bunch of linked data-related gems. We still aren't sure why these linkeddata gems have historically been listed as development-only dependencies instead of runtime dependencies. See #375 --- qa.gemspec | 11 ++++++++++- spec/spec_helper.rb | 8 +++++++- spec/test_app_templates/Gemfile.extra | 9 --------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/qa.gemspec b/qa.gemspec index 5c755ab3..a7344a4b 100644 --- a/qa.gemspec +++ b/qa.gemspec @@ -30,7 +30,16 @@ 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. + 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' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 46cbd8fb..11cf25ef 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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'] diff --git a/spec/test_app_templates/Gemfile.extra b/spec/test_app_templates/Gemfile.extra index ac306458..220d6cc5 100644 --- a/spec/test_app_templates/Gemfile.extra +++ b/spec/test_app_templates/Gemfile.extra @@ -11,15 +11,6 @@ group :development do # if ENV['RAILS_VERSION'] && Gem::Version.new(ENV['RAILS_VERSION']) < Gem::Version.new("6.1") gem 'psych', '< 4' - - # Some versions of linkeddata dependency depend on yaml-ld gem... yaml-ld 0.0.1 - # has a dependency on psych 4.x specifically, conflicting with above, bundler - # seems to be having trouble resolving to yaml-ld 0.0.2 on it's own. - # We don't actually depend on yaml-ld at all ourselves, just trying - # to help bundler resolve a tree that works. - # - # https://github.com/ruby-rdf/linkeddata/issues/16#issuecomment-1239912981 - gem 'yaml-ld', ">= 0.0.2" end if ENV['RAILS_VERSION'] =~ /^6\.1\./ && ENV['RUBY_VERSION'] =~ /^3\.1\./