Skip to content

Commit 8b05a0d

Browse files
committed
Update some CLI options.
1 parent 767c243 commit 8b05a0d

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

example-files/issue-526.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"@vocab" : "http://vocab.getty.edu/",
4+
"a" : "http://vocab.getty.edu/aaaaaaaaaat/"
5+
},
6+
"@id" : "http://vocab.getty.edu/aaaaaaaaaat/5001065997",
7+
"@type": "http://vocab.getty.edu/aaaaaaaaaat/datatype"
8+
}

lib/json/ld/format.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def self.cli_commands
8282
end
8383
end
8484
end,
85-
options: [
86-
RDF::CLI::Option.new(symbol: :context, on: [])
87-
]
85+
option_use: {context: :removed}
8886
},
8987
compact: {
9088
description: "Compact JSON-LD or parsed RDF",
@@ -126,7 +124,7 @@ def self.cli_commands
126124
symbol: :context,
127125
datatype: RDF::URI,
128126
control: :url2,
129-
required: true,
127+
use: :required,
130128
on: ["--context CONTEXT"],
131129
description: "Context to use when compacting.") {|arg| RDF::URI(arg)},
132130
]
@@ -201,13 +199,14 @@ def self.cli_commands
201199
end
202200
end
203201
end,
202+
option_use: {context: :removed},
204203
options: [
205204
RDF::CLI::Option.new(
206205
symbol: :frame,
207206
datatype: RDF::URI,
208207
control: :url2,
209-
required: true,
210-
on: ["--frame FRAME", :REQUIRED],
208+
use: :required,
209+
on: ["--frame FRAME"],
211210
description: "Frame to use when serializing.") {|arg| RDF::URI(arg)}
212211
]
213212
},

0 commit comments

Comments
 (0)