rdf-trix 2.2.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7963a5df8eec5c028738b10dad9a4eb338644d6d
4
- data.tar.gz: 4852084333f762f9b48ed2114f4dec51d957777b
2
+ SHA256:
3
+ metadata.gz: fcb519d95583f7549372cf7158b3d6f6eff1534e74d7d6f5183587fecf974dd3
4
+ data.tar.gz: a75d81aa6706ad6d05d0e5d9bdb793ab5c2f6d62351b8aafe1e1b83b69d588a4
5
5
  SHA512:
6
- metadata.gz: 78c1dd47daa7fac44374a9f12e39bf1d8c785305e96ee53a4f309c9b340b07268cca16a78af5309986bef071ac92af8e98e548a7f6b43e0a3b132149ce986b98
7
- data.tar.gz: 52e4c31014a4c369162425b5c8a2d9bd0e1367b700723321a854a990c56ab3ae7fb23d5b1761414117331213f1a1a9fbdfba101d1f73299223c6dc07480a5782
6
+ metadata.gz: effcfaeffb7c99ff1434d81ba17e22b29caf22b22f5649a7321e25621b8132a77224fdb7e51e876a9e57256a96e1f98b487c93c00d7448ecdbf415afacc0ec6e
7
+ data.tar.gz: 85107068c714384204d1ce8e642777470b1e6e573019dd3347726deeefcdd7aaaf55d50c65b497ccab278f8a8de5978c6296c9eab375f11737123dcba4094a69
data/README.md CHANGED
@@ -22,8 +22,8 @@ Documentation
22
22
  Dependencies
23
23
  ------------
24
24
 
25
- * [RDF.rb](http://rubygems.org/gems/rdf) (>= 2.2.2)
26
- [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.6.0)
25
+ * [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1)
26
+ [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.10.0)
27
27
 
28
28
  Installation
29
29
  ------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 3.1.0
@@ -66,7 +66,7 @@ module RDF::TriX
66
66
  # @yield [reader] `self`
67
67
  # @yieldparam [RDF::Reader] reader
68
68
  # @yieldreturn [void] ignored
69
- def initialize(input = $stdin, options = {}, &block)
69
+ def initialize(input = $stdin, **options, &block)
70
70
  super do
71
71
  @library = case options[:library]
72
72
  when nil
@@ -97,7 +97,7 @@ module RDF::TriX
97
97
  self.extend(@implementation)
98
98
 
99
99
  begin
100
- initialize_xml(options)
100
+ initialize_xml(**options)
101
101
  rescue
102
102
  log_error("Malformed document: #{$!.message}")
103
103
  end
@@ -20,7 +20,7 @@ module RDF::TriX
20
20
  #
21
21
  # @param [Hash{Symbol => Object}] options
22
22
  # @return [void]
23
- def initialize_xml(options = {})
23
+ def initialize_xml(**options)
24
24
  require 'libxml' unless defined?(::LibXML)
25
25
  @xml = case @input
26
26
  when File then ::LibXML::XML::Document.file(@input.path)
@@ -20,7 +20,7 @@ module RDF::TriX
20
20
  #
21
21
  # @param [Hash{Symbol => Object}] options
22
22
  # @return [void]
23
- def initialize_xml(options = {})
23
+ def initialize_xml(**options)
24
24
  require 'nokogiri' unless defined?(::Nokogiri)
25
25
  @xml = ::Nokogiri::XML(@input)
26
26
  log_error("Errors: #{@xml.errors.join('\n')}") unless @xml.errors.empty?
@@ -20,7 +20,7 @@ module RDF::TriX
20
20
  #
21
21
  # @param [Hash{Symbol => Object}] options
22
22
  # @return [void]
23
- def initialize_xml(options = {})
23
+ def initialize_xml(**options)
24
24
  require 'rexml/document' unless defined?(::REXML)
25
25
  @xml = ::REXML::Document.new(@input, :compress_whitespace => %w{uri})
26
26
  end
@@ -70,7 +70,7 @@ module RDF::TriX
70
70
  # @yield [writer] `self`
71
71
  # @yieldparam [RDF::Writer] writer
72
72
  # @yieldreturn [void] ignored
73
- def initialize(output = $stdout, options = {}, &block)
73
+ def initialize(output = $stdout, **options, &block)
74
74
  @graph_name = nil
75
75
  @nesting = 0
76
76
 
@@ -104,7 +104,7 @@ module RDF::TriX
104
104
  self.extend(@implementation)
105
105
 
106
106
  @encoding = (options[:encoding] || 'utf-8').to_s
107
- initialize_xml(options)
107
+ initialize_xml(**options)
108
108
 
109
109
  super do
110
110
  if block_given?
@@ -193,11 +193,11 @@ module RDF::TriX
193
193
  # @param [RDF::Value] object
194
194
  # @param [Hash{Symbol => Object}] options
195
195
  # @return [Element]
196
- def format_triple(subject, predicate, object, options = {})
196
+ def format_triple(subject, predicate, object, **options)
197
197
  create_element(:triple) do |triple|
198
- triple << format_term(subject, options)
199
- triple << format_term(predicate, options)
200
- triple << format_term(object, options)
198
+ triple << format_term(subject, **options)
199
+ triple << format_term(predicate, **options)
200
+ triple << format_term(object, **options)
201
201
  end
202
202
  end
203
203
 
@@ -207,7 +207,7 @@ module RDF::TriX
207
207
  # @param [RDF::Node] value
208
208
  # @param [Hash{Symbol => Object}] options
209
209
  # @return [Element]
210
- def format_node(value, options = {})
210
+ def format_node(value, **options)
211
211
  create_element(:id, value.id.to_s)
212
212
  end
213
213
 
@@ -217,7 +217,7 @@ module RDF::TriX
217
217
  # @param [RDF::URI] value
218
218
  # @param [Hash{Symbol => Object}] options
219
219
  # @return [Element]
220
- def format_uri(value, options = {})
220
+ def format_uri(value, **options)
221
221
  create_element(:uri, value.to_s)
222
222
  end
223
223
 
@@ -227,7 +227,7 @@ module RDF::TriX
227
227
  # @param [RDF::Literal, String, #to_s] value
228
228
  # @param [Hash{Symbol => Object}] options
229
229
  # @return [Element]
230
- def format_literal(value, options = {})
230
+ def format_literal(value, **options)
231
231
  case
232
232
  when value.has_datatype?
233
233
  create_element(:typedLiteral, value.value.to_s, 'datatype' => value.datatype.to_s)
@@ -18,7 +18,7 @@ module RDF::TriX
18
18
  #
19
19
  # @param [Hash{Symbol => Object}] options
20
20
  # @return [void]
21
- def initialize_xml(options = {})
21
+ def initialize_xml(**options)
22
22
  require 'nokogiri' unless defined?(::Nokogiri)
23
23
  @xml = ::Nokogiri::XML::Document.new
24
24
  @xml.encoding = @encoding
@@ -18,7 +18,7 @@ module RDF::TriX
18
18
  #
19
19
  # @param [Hash{Symbol => Object}] options
20
20
  # @return [void]
21
- def initialize_xml(options = {})
21
+ def initialize_xml(**options)
22
22
  require 'rexml/document' unless defined?(::REXML)
23
23
  @xml = ::REXML::Document.new(nil, :attribute_quote => :quote)
24
24
  @xml << ::REXML::XMLDecl.new(::REXML::XMLDecl::DEFAULT_VERSION, @encoding)
metadata CHANGED
@@ -1,111 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-trix
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-14 00:00:00.000000000 Z
11
+ date: 2019-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '2.2'
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '4.0'
19
+ version: '3.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '2.2'
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '4.0'
26
+ version: '3.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rdf-spec
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '2.2'
40
- - - "<"
31
+ - - "~>"
41
32
  - !ruby/object:Gem::Version
42
- version: '4.0'
33
+ version: '3.1'
43
34
  type: :development
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '2.2'
50
- - - "<"
38
+ - - "~>"
51
39
  - !ruby/object:Gem::Version
52
- version: '4.0'
40
+ version: '3.1'
53
41
  - !ruby/object:Gem::Dependency
54
42
  name: rspec
55
43
  requirement: !ruby/object:Gem::Requirement
56
44
  requirements:
57
45
  - - "~>"
58
46
  - !ruby/object:Gem::Version
59
- version: '3.7'
47
+ version: '3.9'
60
48
  type: :development
61
49
  prerelease: false
62
50
  version_requirements: !ruby/object:Gem::Requirement
63
51
  requirements:
64
52
  - - "~>"
65
53
  - !ruby/object:Gem::Version
66
- version: '3.7'
54
+ version: '3.9'
67
55
  - !ruby/object:Gem::Dependency
68
56
  name: rspec-its
69
57
  requirement: !ruby/object:Gem::Requirement
70
58
  requirements:
71
59
  - - "~>"
72
60
  - !ruby/object:Gem::Version
73
- version: '1.2'
61
+ version: '1.3'
74
62
  type: :development
75
63
  prerelease: false
76
64
  version_requirements: !ruby/object:Gem::Requirement
77
65
  requirements:
78
66
  - - "~>"
79
67
  - !ruby/object:Gem::Version
80
- version: '1.2'
68
+ version: '1.3'
81
69
  - !ruby/object:Gem::Dependency
82
70
  name: yard
83
71
  requirement: !ruby/object:Gem::Requirement
84
72
  requirements:
85
73
  - - "~>"
86
74
  - !ruby/object:Gem::Version
87
- version: '0.9'
75
+ version: 0.9.20
88
76
  type: :development
89
77
  prerelease: false
90
78
  version_requirements: !ruby/object:Gem::Requirement
91
79
  requirements:
92
80
  - - "~>"
93
81
  - !ruby/object:Gem::Version
94
- version: '0.9'
82
+ version: 0.9.20
95
83
  - !ruby/object:Gem::Dependency
96
84
  name: nokogiri
97
85
  requirement: !ruby/object:Gem::Requirement
98
86
  requirements:
99
87
  - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: '1.8'
89
+ version: '1.10'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
93
  requirements:
106
94
  - - "~>"
107
95
  - !ruby/object:Gem::Version
108
- version: '1.8'
96
+ version: '1.10'
109
97
  - !ruby/object:Gem::Dependency
110
98
  name: libxml-ruby
111
99
  requirement: !ruby/object:Gem::Requirement
@@ -154,15 +142,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
142
  requirements:
155
143
  - - ">="
156
144
  - !ruby/object:Gem::Version
157
- version: 2.2.2
145
+ version: '2.4'
158
146
  required_rubygems_version: !ruby/object:Gem::Requirement
159
147
  requirements:
160
148
  - - ">="
161
149
  - !ruby/object:Gem::Version
162
150
  version: '0'
163
151
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.6.14
152
+ rubygems_version: 3.0.6
166
153
  signing_key:
167
154
  specification_version: 4
168
155
  summary: TriX support for RDF.rb.