Skip to content

Commit 27c7d9f

Browse files
committed
Without linkeddata loading, attempt to manually load all other serialization gems.
Require 'cli' when used, rather than depend on autoload.
1 parent 2394451 commit 27c7d9f

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

lib/rdf/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
require 'linkeddata'
99
rescue LoadError
1010
# Silently load without linkeddata, but try some others
11-
%w(reasoner rdfa rdfxml turtle vocab json/ld ld/patch).each do |ser|
11+
%w(microdata n3 rdfa rdfxml reasoner tabular trig trix turtle vocab xsd json/ld ld/patch).each do |ser|
1212
begin
1313
require ser.include?('/') ? ser : "rdf/#{ser}"
1414
rescue LoadError

lib/rdf/reader.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# frozen_string_literal: true
2+
require 'cli'
3+
24
module RDF
35
##
46
# The base class for RDF parsers.

lib/rdf/vocab/writer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require 'rdf'
22
require 'rdf/vocabulary'
33
require 'cgi'
4+
require 'cli'
45

56
module RDF
67
##

lib/rdf/writer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# -*- encoding: utf-8 -*-
2+
require 'cli'
3+
24
module RDF
35
##
46
# The base class for RDF serializers.

0 commit comments

Comments
 (0)