rdf-spec 3.1.2 → 3.3.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
2
  SHA256:
3
- metadata.gz: 7fcc3f1dc608559386697ccc24fdedae95f1ddc32ec63a7d597ddb58f81b6e09
4
- data.tar.gz: e1c9dc6188a51add0494b58e01bfdcc35e0a5c3d5b32244e21126144cf1833b9
3
+ metadata.gz: e95a8335e4ccc37e7868fe0e43e0aec44dec59e01e96afc0cf84669e15087b54
4
+ data.tar.gz: dfd4b1c64a28fac6a2eaf9e439c369ab43a45ae005b3bfa2c60a92b5c835473a
5
5
  SHA512:
6
- metadata.gz: 63315553b33a31e334d534e2d75db534e542e486764d288c06575f0291590be978b6499f957780c015cba55805dfea0f99a6777e1e9e986ac9d29e4a84608d8b
7
- data.tar.gz: ebbe887a96cae5f1d174f5d143528ad1e3e881f191c0ff9f389302bd010d7854502f74f91cc0d6d8aa326e7fea82f0f0df937794eadc3dc12a1c6e79efd42556
6
+ metadata.gz: dda993275696d500a2bcb8e74a8913218a5154d6e4cd64dba608d0f84445860f384d32d2bd679495a3a60176a6ed60e29a401e886556a1808b49396195454435
7
+ data.tar.gz: 62dc12063ff5d0946534fd785b6fa5ebcad06587c7cc2469ac417eb0095d9e864451cb2d03c169824ea6f308dc6d9b5b5e36e80b2b46ca288011732a07747ae3
data/README.md CHANGED
@@ -3,9 +3,9 @@
3
3
  This is an [RDF.rb][] extension that provides RDF-specific [RSpec][] matchers
4
4
  and shared examples for Ruby projects that use RDF.rb and RSpec.
5
5
 
6
- [![Gem Version](https://badge.fury.io/rb/rdf-spec.png)](https://badge.fury.io/rb/rdf-spec)
6
+ [![Gem Version](https://badge.fury.io/rb/rdf-spec.svg)](https://badge.fury.io/rb/rdf-spec)
7
7
  [![Build Status](https://github.com/ruby-rdf/rdf-spec/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-spec/actions?query=workflow%3ACI)
8
- [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-spec/badge.svg)](https://coveralls.io/github/ruby-rdf/rdf-spec)
8
+ [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-spec/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-spec?branch=develop)
9
9
  [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
10
10
 
11
11
  ## Documentation
@@ -30,8 +30,8 @@ Note that in most cases, if the instance is empty and mutable, the appropriate s
30
30
 
31
31
  ## Dependencies
32
32
 
33
- * [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.0)
34
- * [RSpec](https://rubygems.org/gems/rspec) (~> 3.7)
33
+ * [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3)
34
+ * [RSpec](https://rubygems.org/gems/rspec) (~> 3.12)
35
35
 
36
36
  ## Installation
37
37
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.3.0
data/etc/doap.ttl CHANGED
@@ -1,4 +1,4 @@
1
- @base <https://rubygems.org/gems/rdf> .
1
+ @base <https://rubygems.org/gems/rdf-spec> .
2
2
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
3
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
4
  @prefix dc: <http://purl.org/dc/terms/> .
@@ -6,53 +6,23 @@
6
6
  @prefix doap: <http://usefulinc.com/ns/doap#> .
7
7
 
8
8
  <> a doap:Project ;
9
- doap:name "RDF.rb" ;
10
- doap:homepage <https://rubygems.org/gems/rdf> ;
9
+ doap:name "RDF::Spec" ;
10
+ doap:homepage <https://rubygems.org/gems/rdf-spec> ;
11
11
  doap:license <https://unlicense.org/1.0/> ;
12
- doap:shortdesc "A Ruby library for working with Resource Description Framework (RDF) data."@en ;
13
- doap:description "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en ;
14
- doap:created "2007-10-23" ;
12
+ doap:shortdesc "RSpec extensions for RDF.rb."@en ;
13
+ doap:description "RDF.rb extension that provides RSpec matchers and shared examples for RDF objects."@en ;
14
+ doap:created "2007-02-03" ;
15
15
  doap:programming-language "Ruby" ;
16
16
  doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
17
17
  <http://dbpedia.org/resource/Ruby_(programming_language)> ;
18
- doap:implements <http://www.w3.org/TR/rdf11-concepts/>,
19
- <http://www.w3.org/TR/n-quads/>,
20
- <http://www.w3.org/TR/n-triples/> ;
21
- doap:download-page <https://rubygems.org/gems/rdf/> ;
22
- doap:bug-database <https://github.com/ruby-rdf/rdf/issues> ;
18
+ doap:download-page <> ;
19
+ doap:bug-database <https://github.com/ruby-rdf/rdf-spec/issues> ;
23
20
  doap:blog <https://ar.to/>, <https://greggkellogg.net/> ;
24
21
  doap:developer <https://ar.to/#self>, <https://bhuga.net/#ben>, <https://greggkellogg.net/foaf#me> ;
25
22
  doap:maintainer <https://greggkellogg.net/foaf#me> ;
26
- doap:documenter <https://ar.to/#self>, <https://bhuga.net/#ben>, <https://greggkellogg.net/foaf#me> ;
27
- doap:helper [a foaf:Person ;
28
- foaf:name "Călin Ardelean" ;
29
- foaf:mbox_sha1sum "274bd18402fc773ffc0606996aa1fb90b603aa29"] ;
30
- doap:helper [a foaf:Person ;
31
- foaf:name "Danny Gagne" ;
32
- foaf:mbox_sha1sum "6de43e9cf7de53427fea9765706703e4d957c17b"] ;
33
- doap:helper [a foaf:Person ;
34
- foaf:name "Joey Geiger" ;
35
- foaf:mbox_sha1sum "f412d743150d7b27b8468d56e69ca147917ea6fc"] ;
36
- doap:helper [a foaf:Person ;
37
- foaf:name "Fumihiro Kato" ;
38
- foaf:mbox_sha1sum "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930"] ;
39
- doap:helper [a foaf:Person ;
40
- foaf:name "Naoki Kawamukai" ;
41
- foaf:mbox_sha1sum "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d"] ;
42
- doap:helper [a foaf:Person ;
43
- foaf:name "Hellekin O. Wolf" ;
44
- foaf:mbox_sha1sum "c69f3255ff0639543cc5edfd8116eac8df16fab8"] ;
45
- doap:helper [a foaf:Person ;
46
- foaf:name "John Fieber" ;
47
- foaf:mbox_sha1sum "f7653fc1ac0e82ebb32f092389bd5fc728eaae12"] ;
48
- doap:helper [a foaf:Person ;
49
- foaf:name "Keita Urashima" ;
50
- foaf:mbox_sha1sum "2b4247b6fd5bb4a1383378f325784318680d5ff9"] ;
51
- doap:helper [a foaf:Person ;
52
- foaf:name "Pius Uzamere" ;
53
- foaf:mbox_sha1sum "bedbbf2451e5beb38d59687c0460032aff92cd3c"] ;
54
- foaf:maker <https://ar.to/#self> ;
55
- dc:creator <https://ar.to/#self> .
23
+ doap:documenter <https://greggkellogg.net/foaf#me> ;
24
+ foaf:maker <https://greggkellogg.net/foaf#me> ;
25
+ dc:creator <https://greggkellogg.net/foaf#me> .
56
26
 
57
27
  <https://ar.to/#self> a foaf:Person ;
58
28
  foaf:name "Arto Bendiken" ;
@@ -67,6 +37,7 @@
67
37
  foaf:mbox_sha1sum "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" ;
68
38
  foaf:homepage <https://bhuga.net/> .
69
39
 
40
+
70
41
  <https://greggkellogg.net/foaf#me> a foaf:Person ;
71
42
  foaf:name "Gregg Kellogg" ;
72
43
  foaf:mbox <mailto:gregg@greggkellogg.net> ;
@@ -29,7 +29,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
29
29
  subject { enumerable }
30
30
  it {is_expected.to respond_to(:supports?)}
31
31
 
32
- describe "valid?" do
32
+ describe "#valid?" do
33
33
  it "reports validity" do
34
34
  if subject.supports?(:validity)
35
35
  is_expected.to be_valid
@@ -72,13 +72,13 @@ RSpec.shared_examples 'an RDF::Enumerable' do
72
72
  it {is_expected.to respond_to(:statements)}
73
73
  its(:statements) {is_expected.to be_a(Array)}
74
74
 
75
- context "#statements" do
75
+ describe "#statements" do
76
76
  specify {expect(subject.statements.size).to eq @rdf_enumerable_iv_statements.size}
77
77
  specify {expect(subject.statements).to all(be_a_statement)}
78
78
  end
79
79
 
80
80
  it {is_expected.to respond_to(:has_statement?)}
81
- context "#has_statement?" do
81
+ describe "#has_statement?" do
82
82
  let(:unknown_statement) {RDF::Statement.new(RDF::Node.new, RDF::URI.new("http://example.org/unknown"), RDF::Node.new)}
83
83
  it "should have all statements" do
84
84
  # Don't check for BNodes, as equivalence depends on their being exactly the same, not just the same identifier. If subject is loaded separately, these won't match.
@@ -112,7 +112,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
112
112
  its(:enum_statement) {is_expected.to be_countable}
113
113
  its(:enum_statement) {is_expected.to be_enumerable}
114
114
  its(:enum_statement) {is_expected.to be_queryable}
115
- context "#enum_statement" do
115
+ describe "#enum_statement" do
116
116
  it "should enumerate all statements" do
117
117
  expect(subject.enum_statement.count).to eq enumerable.each_statement.count
118
118
  subject.enum_statement.each do |s|
@@ -121,6 +121,16 @@ RSpec.shared_examples 'an RDF::Enumerable' do
121
121
  end
122
122
  end
123
123
  end
124
+
125
+ its(:canonicalize) {is_expected.to be_an_enumerator}
126
+ describe "#canonicalize" do
127
+ specify {expect(subject.canonicalize.count).to eq @rdf_enumerable_iv_statements.size}
128
+ specify {expect(subject.canonicalize).to all(be_a_statement)}
129
+
130
+ its "terms should all be in canonical form" do
131
+ subject.canonicalize.terms.all? {|t| t.eql?(t.canonicalize)}
132
+ end
133
+ end
124
134
  end
125
135
 
126
136
  context "when enumerating triples" do
@@ -130,12 +140,12 @@ RSpec.shared_examples 'an RDF::Enumerable' do
130
140
  it {is_expected.to respond_to(:enum_triple)}
131
141
 
132
142
  its(:triples) {is_expected.to be_a(Array)}
133
- context "#triples" do
143
+ describe "#triples" do
134
144
  specify {expect(subject.triples.size).to eq @rdf_enumerable_iv_statements.size}
135
145
  specify {expect(subject.triples).to all(be_a_triple)}
136
146
  end
137
147
 
138
- context "#has_triple?" do
148
+ describe "#has_triple?" do
139
149
  specify do
140
150
  non_bnode_statements.each do |statement|
141
151
  is_expected.to have_triple(statement.to_triple)
@@ -144,7 +154,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
144
154
  end
145
155
 
146
156
  its(:each_triple) {is_expected.to be_an_enumerator}
147
- context "#each_triple" do
157
+ describe "#each_triple" do
148
158
  specify {expect(subject.each_triple).to all(be_a_triple)}
149
159
  it "should iterate over all triples" do
150
160
  subject.each_triple do |*triple|
@@ -156,7 +166,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
156
166
 
157
167
  its(:enum_triple) {is_expected.to be_an_enumerator}
158
168
  its(:enum_triple) {is_expected.to be_countable}
159
- context "#enum_triple" do
169
+ describe "#enum_triple" do
160
170
  it "should enumerate all triples" do
161
171
  expect(subject.enum_triple.count).to eq enumerable.each_triple.count
162
172
  subject.enum_triple.each do |s, p, o|
@@ -174,12 +184,12 @@ RSpec.shared_examples 'an RDF::Enumerable' do
174
184
  it {is_expected.to respond_to(:enum_quad)}
175
185
 
176
186
  its(:quads) {is_expected.to be_a(Array)}
177
- context "#quads" do
187
+ describe "#quads" do
178
188
  specify {expect(subject.quads.size).to eq @rdf_enumerable_iv_statements.size}
179
189
  specify {expect(subject.quads).to all(be_a_quad)}
180
190
  end
181
191
 
182
- context "#has_quad?" do
192
+ describe "#has_quad?" do
183
193
  specify do
184
194
  if supports_named_graphs
185
195
  non_bnode_statements.each do |statement|
@@ -190,7 +200,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
190
200
  end
191
201
 
192
202
  its(:each_quad) {is_expected.to be_an_enumerator}
193
- context "#each_quad" do
203
+ describe "#each_quad" do
194
204
  specify {expect(subject.each_quad).to all(be_a_quad)}
195
205
  it "should iterate over all quads" do
196
206
  subject.each_quad do |*quad|
@@ -202,7 +212,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
202
212
 
203
213
  its(:enum_quad) {is_expected.to be_an_enumerator}
204
214
  its(:enum_quad) {is_expected.to be_countable}
205
- context "#enum_quad" do
215
+ describe "#enum_quad" do
206
216
  it "should enumerate all quads" do
207
217
  expect(subject.enum_quad.count).to eq enumerable.each_quad.count
208
218
  subject.enum_quad.each do |s, p, o, c|
@@ -220,7 +230,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
220
230
  it {is_expected.to respond_to(:each_subject)}
221
231
  it {is_expected.to respond_to(:enum_subject)}
222
232
 
223
- context "#subjects" do
233
+ describe "#subjects" do
224
234
  subject { enumerable.subjects }
225
235
  specify {is_expected.to be_a(Array)}
226
236
  specify {is_expected.to all(be_a_resource)}
@@ -231,7 +241,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
231
241
  end
232
242
  end
233
243
 
234
- context "#has_subject?" do
244
+ describe "#has_subject?" do
235
245
  specify do
236
246
  checked = []
237
247
  non_bnode_statements.each do |statement|
@@ -244,7 +254,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
244
254
  end
245
255
 
246
256
  its(:each_subject) {is_expected.to be_an_enumerator}
247
- context "#each_subject" do
257
+ describe "#each_subject" do
248
258
  specify {expect(subject.each_subject.reject(&:node?).size).to eq subjects.reject(&:node?).size}
249
259
  specify {expect(subject.each_subject).to all(be_a_resource)}
250
260
  specify {subject.each_subject {|value| expect(subjects).to include(value) unless value.node?}}
@@ -252,7 +262,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
252
262
 
253
263
  its(:enum_subject) {is_expected.to be_an_enumerator}
254
264
  its(:enum_subject) {is_expected.to be_countable}
255
- context "#enum_subject" do
265
+ describe "#enum_subject" do
256
266
  specify {expect(subject.enum_subject.to_a.reject(&:node?).size).to eq subjects.reject(&:node?).size}
257
267
  it "should enumerate all subjects" do
258
268
  subject.enum_subject.each do |s|
@@ -270,7 +280,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
270
280
  it {is_expected.to respond_to(:each_predicate)}
271
281
  it {is_expected.to respond_to(:enum_predicate)}
272
282
 
273
- context "#predicates" do
283
+ describe "#predicates" do
274
284
  subject { enumerable.predicates }
275
285
  specify {is_expected.to be_a(Array)}
276
286
  specify {is_expected.to all(be_a_uri)}
@@ -281,7 +291,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
281
291
  end
282
292
  end
283
293
 
284
- context "#has_predicate?" do
294
+ describe "#has_predicate?" do
285
295
  specify do
286
296
  checked = []
287
297
  @rdf_enumerable_iv_statements.each do |statement|
@@ -294,7 +304,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
294
304
  end
295
305
 
296
306
  its(:each_predicate) {is_expected.to be_an_enumerator}
297
- context "#each_predicate" do
307
+ describe "#each_predicate" do
298
308
  specify {expect(subject.each_predicate.to_a.size).to eq predicates.size}
299
309
  specify {expect(subject.each_predicate).to all(be_a_uri)}
300
310
  specify {subject.each_predicate {|value| expect(predicates).to include(value)}}
@@ -302,7 +312,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
302
312
 
303
313
  its(:enum_predicate) {is_expected.to be_an_enumerator}
304
314
  its(:enum_predicate) {is_expected.to be_countable}
305
- context "#enum_predicate" do
315
+ describe "#enum_predicate" do
306
316
  it "should enumerate all predicates" do
307
317
  expect(subject.enum_predicate.to_a).to include(*predicates)
308
318
  end
@@ -316,7 +326,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
316
326
  it {is_expected.to respond_to(:each_object)}
317
327
  it {is_expected.to respond_to(:enum_object)}
318
328
 
319
- context "#objects" do
329
+ describe "#objects" do
320
330
  subject { enumerable.objects }
321
331
  specify {is_expected.to be_a(Array)}
322
332
  specify {is_expected.to all(be_a_term)}
@@ -327,7 +337,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
327
337
  end
328
338
  end
329
339
 
330
- context "#has_object?" do
340
+ describe "#has_object?" do
331
341
  specify do
332
342
  checked = []
333
343
  non_bnode_statements.each do |statement|
@@ -340,7 +350,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
340
350
  end
341
351
 
342
352
  its(:each_object) {is_expected.to be_an_enumerator}
343
- context "#each_object" do
353
+ describe "#each_object" do
344
354
  specify {expect(subject.each_object.reject(&:node?).size).to eq objects.size}
345
355
  specify {expect(subject.each_object).to all(be_a_term)}
346
356
  specify {subject.each_object {|value| expect(objects).to include(value) unless value.node?}}
@@ -348,7 +358,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
348
358
 
349
359
  its(:enum_object) {is_expected.to be_an_enumerator}
350
360
  its(:enum_object) {is_expected.to be_countable}
351
- context "#enum_object" do
361
+ describe "#enum_object" do
352
362
  it "should enumerate all objects" do
353
363
  subject.enum_object.each do |o|
354
364
  expect(o).to be_a_term
@@ -365,7 +375,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
365
375
  it {is_expected.to respond_to(:each_term)}
366
376
  it {is_expected.to respond_to(:enum_term)}
367
377
 
368
- context "#terms" do
378
+ describe "#terms" do
369
379
  subject { enumerable.terms }
370
380
  specify {is_expected.to be_a(Array)}
371
381
  specify {is_expected.to all(be_a_term)}
@@ -376,7 +386,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
376
386
  end
377
387
  end
378
388
 
379
- context "#has_term?" do
389
+ describe "#has_term?" do
380
390
  specify do
381
391
  checked = {}
382
392
  non_bnode_terms.each do |term|
@@ -389,7 +399,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
389
399
  end
390
400
 
391
401
  its(:each_term) {is_expected.to be_an_enumerator}
392
- context "#each_term" do
402
+ describe "#each_term" do
393
403
  it 'has correct number of terms' do
394
404
  expected_count = non_bnode_terms.length
395
405
  expected_count = expected_count - 3 unless
@@ -404,7 +414,7 @@ RSpec.shared_examples 'an RDF::Enumerable' do
404
414
 
405
415
  its(:enum_term) {is_expected.to be_an_enumerator}
406
416
  its(:enum_term) {is_expected.to be_countable}
407
- context "#enum_term" do
417
+ describe "#enum_term" do
408
418
  it "should enumerate all terms" do
409
419
  subject.enum_term.each do |o|
410
420
  expect(o).to be_a_term
@@ -12,7 +12,7 @@ RSpec.shared_examples 'an RDF::HttpAdapter' do
12
12
  before(:each) {WebMock.disable_net_connect!}
13
13
  after(:each) {WebMock.allow_net_connect!}
14
14
 
15
- let(:uri) {"http://ruby-rdf.github.com/rdf/etc/doap.nt"}
15
+ let(:uri) {"https://ruby-rdf.github.io/rdf/etc/doap.nt"}
16
16
 
17
17
  let(:opened) {double("opened")}
18
18
  before(:each) do
@@ -3,7 +3,9 @@ require 'rdf'
3
3
 
4
4
  class RDF::Literal
5
5
  def inspect
6
- "\"#{escape(value)}\" R:L:(#{self.class.to_s.match(/([^:]*)$/)})"
6
+ klass = self.class.to_s.match(/([^:]*)$/).to_s
7
+ dt = self.datatype
8
+ "\"#{escape(value)}\"#{('@' + self.language.to_s) if self.language?} R:L:(#{klass == 'Literal' && dt ? dt : klass})"
7
9
  end
8
10
  end
9
11
 
@@ -5,6 +5,7 @@
5
5
  # include the examples for `RDF::Literal`, `RDF::Literal validation`,
6
6
  # `RDF::Literal canonicalization`, and `RDF::Literal lookup`.
7
7
 
8
+ # @private
8
9
  shared_examples 'RDF::Literal' do |value, datatype_uri|
9
10
  include_examples 'RDF::Literal with datatype and grammar', value, datatype_uri
10
11
  include_examples 'RDF::Literal equality', value, value
@@ -93,7 +94,7 @@ shared_examples 'RDF::Literal canonicalization' do |datatype, pairs|
93
94
  .to eq str
94
95
  end
95
96
 
96
- it "humanizes '#{value}' to '#{str}'" do
97
+ it "humanizes '#{value}' to '#{human}'" do
97
98
  expect(RDF::Literal.new(value,
98
99
  datatype: datatype,
99
100
  canonicalize: false).humanize)
@@ -1,5 +1,5 @@
1
1
  require 'rspec/matchers' # @see https://rubygems.org/gems/rspec
2
- require 'awesome_print'
2
+ require 'amazing_print'
3
3
 
4
4
  module RDF; module Spec
5
5
  ##
@@ -273,7 +273,7 @@ module RDF; module Spec
273
273
  @info = if (info.id rescue false)
274
274
  info
275
275
  elsif info.is_a?(Logger)
276
- Info.new(logger: info)
276
+ Info.new({logger: info})
277
277
  elsif info.is_a?(Hash)
278
278
  Info.new(info[:id], info[:logger], info[:action], info[:result], info[:format], info[:base], info[:prefixes])
279
279
  else
@@ -325,7 +325,7 @@ module RDF; module Spec
325
325
  info = @info.respond_to?(:information) ? @info.information : @info.inspect
326
326
  "Graphs identical\n" +
327
327
  "\n#{info + "\n" unless info.empty?}" +
328
- "Results:\n#{actual.dump(@info.format, **dump_opts) rescue @actual.inspect}" +
328
+ "Results:\n#{actual.dump((@info.format || format), **dump_opts) rescue @actual.inspect}" +
329
329
  "\nDebug:\n#{@info.logger}"
330
330
  end
331
331
 
@@ -257,13 +257,13 @@ RSpec.shared_examples 'an RDF::Queryable' do
257
257
  context "triple pattern combinations" do
258
258
  it "?s p o" do
259
259
  expect(subject.query({predicate: RDF::URI("http://example.org/p"), object: RDF::Literal.new(1)}).to_a).to(
260
- include *[RDF::Statement.new(RDF::URI("http://example.org/xi1"), RDF::URI("http://example.org/p"), 1), RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)]
260
+ include(*[RDF::Statement.new(RDF::URI("http://example.org/xi1"), RDF::URI("http://example.org/p"), 1), RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)])
261
261
  )
262
262
  end
263
263
 
264
264
  it "s ?p o" do
265
265
  expect(subject.query({subject: RDF::URI("http://example.org/xi2"), object: RDF::Literal.new(1)}).to_a).to(
266
- include *[RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)]
266
+ include(*[RDF::Statement.new(RDF::URI("http://example.org/xi2"), RDF::URI("http://example.org/p"), 1)])
267
267
  )
268
268
  end
269
269
  end
@@ -30,7 +30,7 @@ RSpec.shared_examples 'an RDF::Reader' do
30
30
  format_class.file_extensions.each_pair do |sym, content_type|
31
31
  reader_mock = double("reader")
32
32
  expect(reader_mock).to receive(:got_here)
33
- expect(RDF::Reader).to receive(:for).with(file_name: "foo.#{sym}").and_return(reader_class)
33
+ expect(RDF::Reader).to receive(:for).with({file_name: "foo.#{sym}"}).and_return(reader_class)
34
34
  RDF::Reader.open("foo.#{sym}") do |r|
35
35
  expect(r).to be_a(reader_class)
36
36
  reader_mock.got_here
@@ -55,7 +55,7 @@ RSpec.shared_examples 'an RDF::Reader' do
55
55
  format_class.file_extensions.each_pair do |sym, content_type|
56
56
  reader_mock = double("reader")
57
57
  expect(reader_mock).to receive(:got_here)
58
- expect(RDF::Reader).to receive(:for).with(file_name: "foo.#{sym}").and_return(reader_class)
58
+ expect(RDF::Reader).to receive(:for).with({file_name: "foo.#{sym}"}).and_return(reader_class)
59
59
  RDF::Reader.open("foo.#{sym}", file_name: "foo.#{sym}") do |r|
60
60
  expect(r).to be_a(reader_class)
61
61
  reader_mock.got_here
@@ -68,7 +68,7 @@ RSpec.shared_examples 'an RDF::Reader' do
68
68
  format_class.content_types.each_pair do |content_type, formats|
69
69
  reader_mock = double("reader")
70
70
  expect(reader_mock).to receive(:got_here)
71
- expect(RDF::Reader).to receive(:for).with(content_type: content_type, file_name: "foo").and_return(reader_class)
71
+ expect(RDF::Reader).to receive(:for).with({content_type: content_type, file_name: "foo"}).and_return(reader_class)
72
72
  RDF::Reader.open("foo", content_type: content_type) do |r|
73
73
  expect(r).to be_a(reader_class)
74
74
  reader_mock.got_here
@@ -94,7 +94,7 @@ RSpec.shared_examples 'an RDF::Writer' do
94
94
  format_class.file_extensions.each_pair do |sym, content_type|
95
95
  writer_mock = double("writer")
96
96
  expect(writer_mock).to receive(:got_here)
97
- expect(writer_class).to receive(:for).with(file_name: "#{@rdf_writer_iv_basename}.#{sym}").and_return(writer_class)
97
+ expect(writer_class).to receive(:for).with({file_name: "#{@rdf_writer_iv_basename}.#{sym}"}).and_return(writer_class)
98
98
  writer_class.open("#{@rdf_writer_iv_basename}.#{sym}") do |r|
99
99
  expect(r).to be_a(RDF::Writer)
100
100
  writer_mock.got_here
@@ -117,7 +117,7 @@ RSpec.shared_examples 'an RDF::Writer' do
117
117
  format_class.file_extensions.each_pair do |sym, content_type|
118
118
  writer_mock = double("writer")
119
119
  expect(writer_mock).to receive(:got_here)
120
- expect(writer_class).to receive(:for).with(file_name: "#{@rdf_writer_iv_basename}.#{sym}").and_return(writer_class)
120
+ expect(writer_class).to receive(:for).with({file_name: "#{@rdf_writer_iv_basename}.#{sym}"}).and_return(writer_class)
121
121
  writer_class.open("#{@rdf_writer_iv_basename}.#{sym}", file_name: "#{@rdf_writer_iv_basename}.#{sym}") do |r|
122
122
  expect(r).to be_a(RDF::Writer)
123
123
  writer_mock.got_here
@@ -129,7 +129,7 @@ RSpec.shared_examples 'an RDF::Writer' do
129
129
  format_class.content_types.each_pair do |content_type, formats|
130
130
  writer_mock = double("writer")
131
131
  expect(writer_mock).to receive(:got_here)
132
- expect(writer_class).to receive(:for).with(content_type: content_type, file_name: @rdf_writer_iv_basename).and_return(writer_class)
132
+ expect(writer_class).to receive(:for).with({content_type: content_type, file_name: @rdf_writer_iv_basename}).and_return(writer_class)
133
133
  writer_class.open(@rdf_writer_iv_basename, content_type: content_type) do |r|
134
134
  expect(r).to be_a(RDF::Writer)
135
135
  writer_mock.got_here
data/spec/spec_helper.rb CHANGED
@@ -2,10 +2,17 @@ require "bundler/setup"
2
2
  require 'rdf'
3
3
  begin
4
4
  require 'simplecov'
5
- require 'coveralls'
5
+ require 'simplecov-lcov'
6
+
7
+ SimpleCov::Formatter::LcovFormatter.config do |config|
8
+ #Coveralls is coverage by default/lcov. Send info results
9
+ config.report_with_single_file = true
10
+ config.single_report_path = 'coverage/lcov.info'
11
+ end
12
+
6
13
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
7
14
  SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter
15
+ SimpleCov::Formatter::LcovFormatter
9
16
  ])
10
17
  SimpleCov.start do
11
18
  add_filter "matchers.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.3.0
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: 2023-08-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdf
@@ -18,62 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '3.1'
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 3.1.8
21
+ version: '3.3'
25
22
  type: :runtime
26
23
  prerelease: false
27
24
  version_requirements: !ruby/object:Gem::Requirement
28
25
  requirements:
29
26
  - - "~>"
30
27
  - !ruby/object:Gem::Version
31
- version: '3.1'
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 3.1.8
28
+ version: '3.3'
35
29
  - !ruby/object:Gem::Dependency
36
- name: awesome_print
30
+ name: amazing_print
37
31
  requirement: !ruby/object:Gem::Requirement
38
32
  requirements:
39
33
  - - "~>"
40
34
  - !ruby/object:Gem::Version
41
- version: '1.8'
35
+ version: '1.5'
42
36
  type: :runtime
43
37
  prerelease: false
44
38
  version_requirements: !ruby/object:Gem::Requirement
45
39
  requirements:
46
40
  - - "~>"
47
41
  - !ruby/object:Gem::Version
48
- version: '1.8'
42
+ version: '1.5'
49
43
  - !ruby/object:Gem::Dependency
50
44
  name: rdf-isomorphic
51
45
  requirement: !ruby/object:Gem::Requirement
52
46
  requirements:
53
47
  - - "~>"
54
48
  - !ruby/object:Gem::Version
55
- version: '3.1'
49
+ version: '3.3'
56
50
  type: :runtime
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
53
  requirements:
60
54
  - - "~>"
61
55
  - !ruby/object:Gem::Version
62
- version: '3.1'
56
+ version: '3.3'
63
57
  - !ruby/object:Gem::Dependency
64
58
  name: rspec
65
59
  requirement: !ruby/object:Gem::Requirement
66
60
  requirements:
67
61
  - - "~>"
68
62
  - !ruby/object:Gem::Version
69
- version: '3.9'
63
+ version: '3.12'
70
64
  type: :runtime
71
65
  prerelease: false
72
66
  version_requirements: !ruby/object:Gem::Requirement
73
67
  requirements:
74
68
  - - "~>"
75
69
  - !ruby/object:Gem::Version
76
- version: '3.9'
70
+ version: '3.12'
77
71
  - !ruby/object:Gem::Dependency
78
72
  name: rspec-its
79
73
  requirement: !ruby/object:Gem::Requirement
@@ -108,14 +102,14 @@ dependencies:
108
102
  requirements:
109
103
  - - "~>"
110
104
  - !ruby/object:Gem::Version
111
- version: '3.7'
105
+ version: '3.19'
112
106
  type: :runtime
113
107
  prerelease: false
114
108
  version_requirements: !ruby/object:Gem::Requirement
115
109
  requirements:
116
110
  - - "~>"
117
111
  - !ruby/object:Gem::Version
118
- version: '3.7'
112
+ version: '3.19'
119
113
  - !ruby/object:Gem::Dependency
120
114
  name: yard
121
115
  requirement: !ruby/object:Gem::Requirement
@@ -193,7 +187,12 @@ files:
193
187
  homepage: https://github.com/ruby-rdf/rdf-spec/
194
188
  licenses:
195
189
  - Unlicense
196
- metadata: {}
190
+ metadata:
191
+ documentation_uri: https://ruby-rdf.github.io/rdf-spec
192
+ bug_tracker_uri: https://github.com/ruby-rdf/rdf-spec/issues
193
+ homepage_uri: https://github.com/ruby-rdf/rdf-spec
194
+ mailing_list_uri: https://lists.w3.org/Archives/Public/public-rdf-ruby/
195
+ source_code_uri: https://github.com/ruby-rdf/rdf-spec
197
196
  post_install_message:
198
197
  rdoc_options: []
199
198
  require_paths:
@@ -202,14 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
201
  requirements:
203
202
  - - ">="
204
203
  - !ruby/object:Gem::Version
205
- version: '2.4'
204
+ version: '3.0'
206
205
  required_rubygems_version: !ruby/object:Gem::Requirement
207
206
  requirements:
208
207
  - - ">="
209
208
  - !ruby/object:Gem::Version
210
209
  version: '0'
211
210
  requirements: []
212
- rubygems_version: 3.2.3
211
+ rubygems_version: 3.4.19
213
212
  signing_key:
214
213
  specification_version: 4
215
214
  summary: RSpec extensions for RDF.rb.