rdf 3.1.8 → 3.1.9

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/rdf/cli.rb +26 -7
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2becf1b8beb0505402d0b4d2a6f7795cca3657bc579ffac31f3b6037d34e550
4
- data.tar.gz: 14b57058dab38a7f7a23df435b83ce8e45c56c51ef718a107e1f1fedb6939a63
3
+ metadata.gz: 2bef3d8a6e581bbf440091f39f73f61504a942ea38ec97d5a4885030d93400d6
4
+ data.tar.gz: 83fc1c5544b286a7e859e98f0674fc48dec07fd3756371e00677393358a3d6ca
5
5
  SHA512:
6
- metadata.gz: 685797b5318d90aeba5755a88cc4aa0acc37b69bcc209d579d52910f0940cdf93d2b453cb3b60a0779cfadda80a2bc050afad2d18b276d973b21e6f1e3f79317
7
- data.tar.gz: a13b21146dfa64967464026e99d80bff9f6b472f4ef7d8079ee53a7e80d80f8577b4b7deee9b60643697354e6b42d093b4229d21978f93b5c65b4a2fa050270f
6
+ metadata.gz: 0bfe6c39d8f96cddd544b908e43fb1481ad6ef4fd32b4eefaf2a38f590ffa226f86150adc655cc34a411737956ee9f2c403352ff88056026d1f422b4db5f2a84
7
+ data.tar.gz: 02142d3d36e4cce7a65d71d287a0748de0b716f0cbf25647092c65ba662bc4c78736403cc57e53deafc41ed37b36dc55fc602703b1a21ccaf543a1a084ab7363
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.8
1
+ 3.1.9
@@ -8,9 +8,26 @@ begin
8
8
  require 'linkeddata'
9
9
  rescue LoadError
10
10
  # Silently load without linkeddata, but try some others
11
- %w(microdata n3 rdfa rdfxml reasoner tabular trig trix turtle vocab xsd json/ld ld/patch).each do |ser|
11
+ %w(
12
+ json/ld
13
+ ld/patch
14
+ rdf/microdata
15
+ rdf/n3
16
+ rdf/ordered_repo
17
+ rdf/rdfa
18
+ rdf/rdfxml
19
+ rdf/reasoner
20
+ rdf/tabular
21
+ rdf/trig
22
+ rdf/trix
23
+ rdf/turtle
24
+ rdf/vocab
25
+ rdf/xsd
26
+ shacl
27
+ shex
28
+ ).each do |ser|
12
29
  begin
13
- require ser.include?('/') ? ser : "rdf/#{ser}"
30
+ require ser
14
31
  rescue LoadError
15
32
  end
16
33
  end
@@ -457,7 +474,7 @@ module RDF
457
474
  # @param [Array<String>] args
458
475
  # @param [IO] output
459
476
  # @param [OptionParser] option_parser
460
- # @param [Hash{Symbol => Hash{Symbol => Array[String]}}] messages used for confeying non primary-output which is structured.
477
+ # @param [Hash{Symbol => Hash{Symbol => Array[String]}}] messages used for conveying non primary-output which is structured.
461
478
  # @param [Hash{Symbol => Object}] options
462
479
  # @return [Boolean]
463
480
  def self.exec(args, output: $stdout, option_parser: nil, messages: {}, **options)
@@ -506,10 +523,12 @@ module RDF
506
523
  options[:output_format] = options[:output_format].to_sym if options[:output_format]
507
524
 
508
525
  # Allow repository to be set via option.
509
- @repository = options[:repository] ||
510
- (options[:ordered] ?
511
- [].extend(RDF::Enumerable, RDF::Queryable) :
512
- RDF::Repository.new)
526
+ # If RDF::OrderedRepo is present, use it if the `ordered` option is specified, otherwise extend an Array.
527
+ @repository = options[:repository] || case
528
+ when RDF.const_defined?(:OrderedRepo) then RDF::OrderedRepo.new
529
+ when options[:ordered] then [].extend(RDF::Enumerable, RDF::Queryable)
530
+ else RDF::Repository.new
531
+ end
513
532
 
514
533
  # Parse input files if any command requires it
515
534
  if cmds.any? {|c| COMMANDS[c.to_sym][:parse]}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.8
4
+ version: 3.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-12-25 00:00:00.000000000 Z
13
+ date: 2021-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: link_header
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  - !ruby/object:Gem::Version
304
304
  version: '0'
305
305
  requirements: []
306
- rubygems_version: 3.2.3
306
+ rubygems_version: 3.1.4
307
307
  signing_key:
308
308
  specification_version: 4
309
309
  summary: A Ruby library for working with Resource Description Framework (RDF) data.