lib/json/ld/writer.rb in json-ld-3.1.4 vs lib/json/ld/writer.rb in json-ld-3.1.5
- old
+ new
@@ -91,11 +91,11 @@
RDF::CLI::Option.new(
symbol: :context,
datatype: RDF::URI,
control: :url2,
on: ["--context CONTEXT"],
- description: "Context to use when compacting.") {|arg| RDF::URI(arg)},
+ description: "Context to use when compacting.") {|arg| RDF::URI(arg).absolute? ? RDF::URI(arg) : StringIO.new(File.read(arg))},
RDF::CLI::Option.new(
symbol: :embed,
datatype: %w(@always @once @never),
default: '@once',
control: :select,
@@ -106,10 +106,17 @@
datatype: TrueClass,
control: :checkbox,
on: ["--[no-]explicit"],
description: "Only include explicitly declared properties in output (false)") {|arg| arg},
RDF::CLI::Option.new(
+ symbol: :frame,
+ datatype: RDF::URI,
+ control: :url2,
+ use: :required,
+ on: ["--frame FRAME"],
+ description: "Frame to use when serializing.") {|arg| RDF::URI(arg).absolute? ? RDF::URI(arg) : StringIO.new(File.read(arg))},
+ RDF::CLI::Option.new(
symbol: :lowercaseLanguage,
datatype: TrueClass,
control: :checkbox,
on: ["--[no-]lowercase-language"],
description: "By default, language tags are left as is. To normalize to lowercase, set this option to `true`."),
@@ -135,11 +142,11 @@
symbol: :rdfDirection,
datatype: %w(i18n-datatype compound-literal),
default: 'null',
control: :select,
on: ["--rdf-direction DIR", %w(i18n-datatype compound-literal)],
- description: "How to serialize literal direction (i18n-datatype compound-literal)") {|arg| RDF::URI(arg)},
+ description: "How to serialize literal direction (i18n-datatype compound-literal)") {|arg| arg},
RDF::CLI::Option.new(
symbol: :requireAll,
datatype: TrueClass,
default: true,
control: :checkbox,
@@ -200,10 +207,10 @@
# @param [String] url
def default_context=(url); @default_context = url; end
end
##
- # Initializes the RDF-LD writer instance.
+ # Initializes the JSON-LD writer instance.
#
# @param [IO, File] output
# the output stream
# @param [Hash{Symbol => Object}] options
# any additional options