From 460d68b2fceb754b36646ea54cccf97892c9f9ba Mon Sep 17 00:00:00 2001 From: Jonathan Rochkind Date: Tue, 26 Nov 2019 17:13:18 -0500 Subject: [PATCH] replace linkeddata dependency with rdf and nokogiri the linkeddata gem (https://github.com/ruby-rdf/linkeddata/) is an omnibus/metadistribution of large parts of the rdf_rb ecosystem, including "all parsing/serialization plugins." ldpath isn't actually using them all. By replacing dependency with only the sub-parts of `linkeddata` actually being used, we can dramatically reduce the dependency tree of anything downstream from `ldpath`, reducing install time and size for those downstream things, and eliminating unnecessary dependency tree conflicts. rdf and nokogiri appear to be the only parts of linkeddata actually used. --- ldpath.gemspec | 3 ++- lib/ldpath.rb | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ldpath.gemspec b/ldpath.gemspec index 85af27f..68514a1 100644 --- a/ldpath.gemspec +++ b/ldpath.gemspec @@ -18,7 +18,8 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_dependency "parslet" - spec.add_dependency "linkeddata" + spec.add_dependency "rdf", '~> 3.0' + spec.add_dependency "nokogiri", "~> 1.8" # spec.add_development_dependency "bixby", "~> 1.0.0" spec.add_development_dependency "bundler", "~> 1.5" diff --git a/lib/ldpath.rb b/lib/ldpath.rb index b6e55a5..c7d7155 100644 --- a/lib/ldpath.rb +++ b/lib/ldpath.rb @@ -1,6 +1,11 @@ require "ldpath/version" -require 'linkeddata' require 'logger' +require 'nokogiri' +require 'rdf' +# require rdf/ntriples may not be necessary, may only really be necessary +# for ldpath_program_spec.rb tests, but I'm not certain, and I don't think it hurts +# to do it here. +require 'rdf/ntriples' module Ldpath require 'ldpath/field_mapping'