earl-report 0.6.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -15
- data/VERSION +1 -1
- data/lib/earl_report/views/earl_report.html.haml +6 -2
- data/lib/earl_report.rb +57 -45
- data/spec/earl_report_spec.rb +10 -3
- data/spec/spec_helper.rb +21 -2
- data/spec/test-files/doap.ttl +1 -1
- data/spec/test-files/report-complete.ttl +1 -1
- data/spec/test-files/report-no-foaf.ttl +1 -1
- data/spec/test-files/report-no-test.ttl +1 -1
- data/spec/test-files/results.html +17 -17
- data/spec/test-files/results.jsonld +102 -94
- data/spec/test-files/results.ttl +29 -29
- metadata +45 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 857a0fe097b59bd59f9c12b94eabaeb250571db86e013b18c1f1f2ba8a25d6fb
|
4
|
+
data.tar.gz: cc6261fa941d98c5ebe1cf2b1a8a999b1c5b510c3c364842e985da48461a9c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c602f4e3b5232e5f9449027e942dbc64ecd70b91a2bd43fcf05b620f418e0d68da344024e8021973d956cbeb6ad58e3c41a3e38c47ccea7a8a4e631d854c92
|
7
|
+
data.tar.gz: eb7ee3ee2297b5e40807c5f340a1d70b1672cdf869a1e990388516a586daf9cbdec1520ffdb125dca1b1e5c5eec6decb314681f55039f48cc44d77570aa561d7
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# earl-report
|
2
|
-
Ruby gem to consolidate multiple EARL report and generate a rollup conformance report.
|
2
|
+
Ruby gem to consolidate multiple [EARL][] report and generate a rollup conformance report.
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/earl-report.png)](http://badge.fury.io/rb/earl-report)
|
5
5
|
[![Build Status](https://github.com/gkellogg/earl-report/workflows/CI/badge.svg?branch=develop)](https://github.com/gkellogg/earl-report/actions?query=workflow%3ACI)
|
@@ -8,8 +8,9 @@ Ruby gem to consolidate multiple EARL report and generate a rollup conformance r
|
|
8
8
|
## Description
|
9
9
|
Reads a test manifest in the
|
10
10
|
[standard RDF WG format](http://www.w3.org/2011/rdf-wg/wiki/Turtle_Test_Suite)
|
11
|
-
along with one or more individual EARL reports and generates a rollup report in
|
12
|
-
|
11
|
+
along with one or more individual <abbr title="Evaluation and Report Language (EARL) 1.0 Schema">[EARL][]</abbr> reports and generates a rollup report in HTML in [ReSpec][] format.
|
12
|
+
|
13
|
+
[EARL]() reports use the [Evaluation and Report Language (EARL) 1.0 Schema][EARL] to describe test results in RDF to relate the results for a given _subject_ to a _test_ defined in a _test manifest_.
|
13
14
|
|
14
15
|
## Individual EARL reports
|
15
16
|
Results for individual implementations should be specified in Turtle form, but
|
@@ -26,13 +27,13 @@ in the following form:
|
|
26
27
|
dc:date "2012-11-17T15:19:11-05:00"^^xsd:dateTime];
|
27
28
|
earl:mode earl:automatic ] .
|
28
29
|
|
29
|
-
Additionally, `earl:subject` is expected to reference a [DOAP]
|
30
|
+
Additionally, `earl:subject` is expected to reference a [DOAP][] description
|
30
31
|
of the reported software, in the following form:
|
31
32
|
|
32
33
|
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
33
34
|
doap:name "RDF::Turtle" ;
|
34
35
|
doap:developer <https://greggkellogg.net/foaf#me> ;
|
35
|
-
doap:homepage <
|
36
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
36
37
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
37
38
|
doap:release [
|
38
39
|
doap:name "RDF::Turtle 3.1.0" ;
|
@@ -41,26 +42,26 @@ of the reported software, in the following form:
|
|
41
42
|
] ;
|
42
43
|
doap:programming-language "Ruby" .
|
43
44
|
|
44
|
-
The [DOAP]
|
45
|
+
The [DOAP][] description may be included in the [EARL][] report. If not found,
|
45
46
|
the IRI identified by `earl:subject` will be dereferenced and is presumed to
|
46
|
-
provide a [DOAP]
|
47
|
+
provide a [DOAP][] specification of the test subject.
|
47
48
|
|
48
|
-
The `doap:developer` is expected to reference a [FOAF]
|
49
|
+
The `doap:developer` is expected to reference a [FOAF][] profile for the agent
|
49
50
|
(user or organization) responsible for the test subject. It is expected to be
|
50
51
|
of the following form:
|
51
52
|
|
52
53
|
<https://greggkellogg.net/foaf#me> foaf:name "Gregg Kellogg" .
|
53
54
|
|
54
55
|
If not found, the IRI identified by `doap:developer`
|
55
|
-
will be dereferenced and is presumed to provide a [FOAF]
|
56
|
+
will be dereferenced and is presumed to provide a [FOAF][] profile of the developer.
|
56
57
|
|
57
58
|
Assertions are added to each test entry based on that test being referenced from the assertion.
|
58
59
|
|
59
60
|
## Manifest query
|
60
61
|
The test manifest is used to find test entries and a manifest. The built-in
|
61
|
-
query is based on the [standard RDF WG format]
|
62
|
+
query is based on the [standard RDF WG format][]. Alternative manifest formats
|
62
63
|
can be used by specifying a customized manifest query, but may require a custom
|
63
|
-
[Haml]
|
64
|
+
[Haml][] template for report generation. The default query is the following:
|
64
65
|
|
65
66
|
PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
|
66
67
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
@@ -75,14 +76,24 @@ can be used by specifying a customized manifest query, but may require a custom
|
|
75
76
|
}
|
76
77
|
|
77
78
|
## Report generation template
|
78
|
-
The report template is in [ReSpec][] form using [Haml]
|
79
|
+
The report template is in [ReSpec][] form using [Haml][] to generate individual report elements.
|
79
80
|
|
80
81
|
## Changes from previous versions
|
81
|
-
Version 0.
|
82
|
+
### Version 0.7
|
83
|
+
Version 0.7 creates incompatibilities with previous result formats. Previously, terms were "added" to the EARL vocabulary to help with coordination. This version pulls that back, but does depend on an added `earl:Report` class which acts as an appropriate container for for collections of `earl:Assertion`.
|
84
|
+
|
85
|
+
Within an `earl:TestCase`, the former `earl:assertions` property is replaced with a reverse property on `earl:test` so that, in the JSON-LD representation, an `earl:TestCase` will contain a property representing the related assertions.
|
86
|
+
|
87
|
+
Also, `earl:assertions` had been miss-appropriated to reference the sources of the individual test results provided for each test subject. A new property as appropriated from the Test Manifest vocabulary: `mf:report`. The alias `assertions` continues to be used within the JSON-LD representation, although it now maps to `mf:report` at the top level, and as mentioned, is a reverse property of `earl:test` within an `earl:TestCase`.
|
88
|
+
|
89
|
+
These changes may require updates to customized Haml templates.
|
90
|
+
|
91
|
+
### Version 0.3
|
92
|
+
Version 0.3 and prior re-constructed the test manifest used to create the body of the report, which caused information not described within the query to be lost. Starting with 0.4, all manifests and assertions are read into a single graph, and each test references a list of assertions against it using a list referenced by `mf:assertions`. Additionally, all included manifests are included in a top-level entity referenced via `mf:entries`. For example:
|
82
93
|
|
83
94
|
<> a earl:Software, doap:Project;
|
84
95
|
mf:entries (<http://example/manifest.ttl>);
|
85
|
-
|
96
|
+
mf:assertions (<spec/test-files/report-complete.ttl>) .
|
86
97
|
|
87
98
|
<http://example/manifest.ttl> a mf:Manifest, earl:Report;
|
88
99
|
mf:name "Example Test Cases";
|
@@ -94,7 +105,7 @@ Version 0.3 and prior re-constructed the test manifest used to create the body o
|
|
94
105
|
rdfs:comment "Blank subject";
|
95
106
|
mf:action <http://example/test-00.ttl>;
|
96
107
|
mf:result <http://example/test-00.out>;
|
97
|
-
|
108
|
+
mf:assertions ([
|
98
109
|
a earl:Assertion;
|
99
110
|
earl:assertedBy <https://greggkellogg.net/foaf#me>;
|
100
111
|
earl:mode earl:automatic;
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
@@ -204,6 +204,7 @@
|
|
204
204
|
Test Manifests
|
205
205
|
%ul.toc
|
206
206
|
- tests['entries'].sort_by {|m| m['title'].to_s.downcase}.each_with_index do |manifest, ndx|
|
207
|
+
- manifest['rdfs:comment'] = manifest['rdfs:comment']['@value'] if manifest['rdfs:comment'].is_a?(Hash)
|
207
208
|
%li.tocline
|
208
209
|
%span.secno="2.#{ndx+1}"
|
209
210
|
%a.tocxref{href: "##{manifest['rdfs:comment'].gsub(' ', '-')}"}
|
@@ -296,6 +297,7 @@
|
|
296
297
|
Test Manifests
|
297
298
|
- tests['entries'].each_with_index do |manifest, ndx2|
|
298
299
|
- test_cases = manifest['entries']
|
300
|
+
- manifest['title'] = manifest['title']['@value'] if manifest['title'].is_a?(Hash)
|
299
301
|
%section{id: manifest['rdfs:comment'].gsub(' ', '-'), typeof: manifest['@type'].join(" "), resource: manifest['@id']}
|
300
302
|
%h2
|
301
303
|
%span.secno="2.#{ndx2+1}"
|
@@ -319,6 +321,7 @@
|
|
319
321
|
%a{href: '#' + subject_refs[subject['@id']]}<=subject['name']
|
320
322
|
- test_cases.each do |test|
|
321
323
|
- test['title'] ||= test['rdfs:label']
|
324
|
+
- test['title'] = test['title']['@value'] if test['title'].is_a?(Hash)
|
322
325
|
- test['title'] = Array(test['title']).first
|
323
326
|
- tid = "test_#{Digest::MD5.hexdigest(test['@id'])}"
|
324
327
|
- (test_info[tid] ||= []) << test
|
@@ -333,7 +336,7 @@
|
|
333
336
|
- assertion = test['assertions'].detect {|a| a['subject'] == subject['@id']}
|
334
337
|
- pass_fail = assertion['result']['outcome'].split(':').last.upcase.sub(/(PASS|FAIL)ED$/, '\1')
|
335
338
|
- passed_tests[ndx2][ndx] = (passed_tests[ndx2][ndx] || 0) + (pass_fail == 'PASS' ? 1 : 0)
|
336
|
-
%td{class: pass_fail,
|
339
|
+
%td{class: pass_fail, typeof: assertion['@type']}
|
337
340
|
- if assertion['assertedBy'] && !assertion['assertedBy'].start_with?('_:')
|
338
341
|
%link{property: "earl:assertedBy", href: assertion['assertedBy']}
|
339
342
|
- if assertion['test'] && !assertion['test'].start_with?('_:')
|
@@ -391,6 +394,7 @@
|
|
391
394
|
- if subject['developer']
|
392
395
|
%dt= "Developer"
|
393
396
|
- subject['developer'].each do |dev|
|
397
|
+
- dev['foaf:name'] = dev['foaf:name']['@value'] if dev['foaf:name'].is_a?(Hash)
|
394
398
|
%dd{rel: "doap:developer"}
|
395
399
|
%div{resource: dev['@id'], typeof: Array(dev['@type']).join(" ")}
|
396
400
|
- if dev.has_key?('@id')
|
@@ -418,7 +422,7 @@
|
|
418
422
|
%td{class: (pct == 100.0 ? 'passed-all' : (pct >= 85.0 ? 'passed-most' : 'passed-some'))}
|
419
423
|
= "#{passed}/#{total} (#{'%.1f' % pct}%)"
|
420
424
|
- unless tests['assertions'].empty?
|
421
|
-
%section.appendix#individual-test-results{rel: "xhv:related
|
425
|
+
%section.appendix#individual-test-results{rel: "xhv:related mf:report"}
|
422
426
|
%h2
|
423
427
|
%span.secno="B."
|
424
428
|
Individual Test Results
|
data/lib/earl_report.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# EARL reporting
|
2
2
|
require 'json/ld'
|
3
|
+
require 'rdf/ordered_repo'
|
3
4
|
require 'rdf/turtle'
|
4
5
|
require 'rdf/vocab'
|
5
6
|
require 'sparql'
|
@@ -67,16 +68,16 @@ class EarlReport
|
|
67
68
|
ASSERTION_QUERY = %(
|
68
69
|
PREFIX earl: <http://www.w3.org/ns/earl#>
|
69
70
|
|
70
|
-
SELECT ?test ?subject ?by ?mode ?outcome
|
71
|
+
SELECT ?test ?subject ?by ?mode ?outcome ?info
|
71
72
|
WHERE {
|
72
73
|
?a a earl:Assertion;
|
73
74
|
earl:assertedBy ?by;
|
74
|
-
earl:result
|
75
|
+
earl:result ?result;
|
75
76
|
earl:subject ?subject;
|
76
77
|
earl:test ?test .
|
77
|
-
|
78
|
-
|
79
|
-
}
|
78
|
+
?result earl:outcome ?outcome .
|
79
|
+
OPTIONAL {?a earl:mode ?mode .}
|
80
|
+
OPTIONAL {?result earl:info ?info .}
|
80
81
|
}
|
81
82
|
ORDER BY ?subject
|
82
83
|
).freeze
|
@@ -93,12 +94,20 @@ class EarlReport
|
|
93
94
|
"foaf" => "http://xmlns.com/foaf/0.1/",
|
94
95
|
"rdfs" => "http://www.w3.org/2000/01/rdf-schema#",
|
95
96
|
"assertedBy" => {"@type" => "@id"},
|
96
|
-
"assertions" => {"@type" => "@id", "@container" => "@set"},
|
97
|
+
"assertions" => {"@id" => "mf:report", "@type" => "@id", "@container" => "@set"},
|
97
98
|
"bibRef" => {"@id" => "dc:bibliographicCitation"},
|
98
99
|
"created" => {"@id" => "doap:created", "@type" => "xsd:date"},
|
99
100
|
"description" => {"@id" => "rdfs:comment", "@language" => "en"},
|
100
101
|
"developer" => {"@id" => "doap:developer", "@type" => "@id", "@container" => "@set"},
|
101
102
|
"doapDesc" => {"@id" => "doap:description", "@language" => "en"},
|
103
|
+
"entries" => {
|
104
|
+
"@id" => "mf:entries", "@type" => "@id", "@container" => "@list",
|
105
|
+
"@context" => {
|
106
|
+
"assertions" => {
|
107
|
+
"@reverse" => "earl:test", "@type" => "@id", "@container" => "@set"
|
108
|
+
},
|
109
|
+
}
|
110
|
+
},
|
102
111
|
"generatedBy" => {"@type" => "@id"},
|
103
112
|
"homepage" => {"@id" => "doap:homepage", "@type" => "@id"},
|
104
113
|
"language" => {"@id" => "doap:programming-language"},
|
@@ -114,7 +123,6 @@ class EarlReport
|
|
114
123
|
"testAction" => {"@id" => "mf:action", "@type" => "@id"},
|
115
124
|
"testResult" => {"@id" => "mf:result", "@type" => "@id"},
|
116
125
|
"title" => {"@id" => "mf:name"},
|
117
|
-
"entries" => {"@id" => "mf:entries", "@type" => "@id", "@container" => "@list"},
|
118
126
|
"testSubjects" => {"@type" => "@id", "@container" => "@set"},
|
119
127
|
"xsd" => {"@id" => "http://www.w3.org/2001/XMLSchema#"}
|
120
128
|
},
|
@@ -184,7 +192,6 @@ class EarlReport
|
|
184
192
|
).gsub(/^ /, '')
|
185
193
|
|
186
194
|
# Convenience vocabularies
|
187
|
-
class EARL < RDF::Vocabulary("http://www.w3.org/ns/earl#"); end
|
188
195
|
class MF < RDF::Vocabulary("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#"); end
|
189
196
|
|
190
197
|
##
|
@@ -304,19 +311,22 @@ class EarlReport
|
|
304
311
|
end
|
305
312
|
|
306
313
|
# Load developers referenced from Test Subjects
|
307
|
-
if !solutions.
|
314
|
+
if !solutions.all? {|s| s[:developer]}
|
308
315
|
warn "\nNo developer identified for #{solutions.first[:uri]}"
|
309
|
-
elsif !solutions.
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
316
|
+
elsif !solutions.all? {|s| s[:devName]}
|
317
|
+
solutions.reject {|s| s[:devName]}.each do |no_foaf|
|
318
|
+
status " read description for developer #{no_foaf[:developer].inspect}"
|
319
|
+
begin
|
320
|
+
foaf_graph = RDF::Graph.load(no_foaf[:developer])
|
321
|
+
status " loaded #{foaf_graph.count} triples"
|
322
|
+
file_graph << foaf_graph.to_a
|
323
|
+
rescue
|
324
|
+
warn "\nfailed to load FOAF from #{no_foaf[:developer]}: #{$!}"
|
325
|
+
end
|
319
326
|
end
|
327
|
+
|
328
|
+
# Reload solutions
|
329
|
+
solutions = SPARQL.execute(TEST_SUBJECT_QUERY, file_graph)
|
320
330
|
end
|
321
331
|
|
322
332
|
release = nil
|
@@ -331,8 +341,8 @@ class EarlReport
|
|
331
341
|
doapDesc.language ||= :en if doapDesc
|
332
342
|
devName = solution[:devName].to_s if solution[:devName]
|
333
343
|
graph << RDF::Statement(solution[:uri], RDF.type, RDF::Vocab::DOAP.Project)
|
334
|
-
graph << RDF::Statement(solution[:uri], RDF.type, EARL.TestSubject)
|
335
|
-
graph << RDF::Statement(solution[:uri], RDF.type, EARL.Software)
|
344
|
+
graph << RDF::Statement(solution[:uri], RDF.type, RDF::Vocab::EARL.TestSubject)
|
345
|
+
graph << RDF::Statement(solution[:uri], RDF.type, RDF::Vocab::EARL.Software)
|
336
346
|
graph << RDF::Statement(solution[:uri], RDF::Vocab::DOAP.name, doapName)
|
337
347
|
graph << RDF::Statement(solution[:uri], RDF::Vocab::DOAP.developer, solution[:developer])
|
338
348
|
graph << RDF::Statement(solution[:uri], RDF::Vocab::DOAP.homepage, solution[:homepage]) if solution[:homepage]
|
@@ -377,15 +387,16 @@ class EarlReport
|
|
377
387
|
ary = test_assertion_lists[solution[:test]]
|
378
388
|
|
379
389
|
ary[ndx] = a = RDF::Node.new
|
380
|
-
graph << RDF::Statement(a, RDF.type, EARL.Assertion)
|
381
|
-
graph << RDF::Statement(a, EARL.subject, subject)
|
382
|
-
graph << RDF::Statement(a, EARL.test, solution[:test])
|
383
|
-
graph << RDF::Statement(a, EARL.assertedBy, solution[:by])
|
384
|
-
graph << RDF::Statement(a, EARL.mode, solution[:mode]) if solution[:mode]
|
390
|
+
graph << RDF::Statement(a, RDF.type, RDF::Vocab::EARL.Assertion)
|
391
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.subject, subject)
|
392
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.test, solution[:test])
|
393
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.assertedBy, solution[:by])
|
394
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.mode, solution[:mode]) if solution[:mode]
|
385
395
|
r = RDF::Node.new
|
386
|
-
graph << RDF::Statement(a, EARL.result, r)
|
387
|
-
graph << RDF::Statement(r, RDF.type, EARL.TestResult)
|
388
|
-
graph << RDF::Statement(r, EARL.outcome, solution[:outcome])
|
396
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.result, r)
|
397
|
+
graph << RDF::Statement(r, RDF.type, RDF::Vocab::EARL.TestResult)
|
398
|
+
graph << RDF::Statement(r, RDF::Vocab::EARL.outcome, solution[:outcome])
|
399
|
+
graph << RDF::Statement(r, RDF::Vocab::EARL.info, solution[:info]) if solution[:info]
|
389
400
|
end
|
390
401
|
|
391
402
|
# See if subject did not report results, which may indicate a formatting error in the EARL source
|
@@ -401,17 +412,14 @@ class EarlReport
|
|
401
412
|
unless a
|
402
413
|
assertion_stats["Untested"] = assertion_stats["Untested"].to_i + 1
|
403
414
|
ary[ndx] = a = RDF::Node.new
|
404
|
-
graph << RDF::Statement(a, RDF.type, EARL.Assertion)
|
405
|
-
graph << RDF::Statement(a, EARL.subject, subjects.keys[ndx])
|
406
|
-
graph << RDF::Statement(a, EARL.test, test)
|
415
|
+
graph << RDF::Statement(a, RDF.type, RDF::Vocab::EARL.Assertion)
|
416
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.subject, subjects.keys[ndx])
|
417
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.test, test)
|
407
418
|
r = RDF::Node.new
|
408
|
-
graph << RDF::Statement(a, EARL.result, r)
|
409
|
-
graph << RDF::Statement(r, RDF.type, EARL.TestResult)
|
410
|
-
graph << RDF::Statement(r, EARL.outcome, EARL.untested)
|
419
|
+
graph << RDF::Statement(a, RDF::Vocab::EARL.result, r)
|
420
|
+
graph << RDF::Statement(r, RDF.type, RDF::Vocab::EARL.TestResult)
|
421
|
+
graph << RDF::Statement(r, RDF::Vocab::EARL.outcome, RDF::Vocab::EARL.untested)
|
411
422
|
end
|
412
|
-
|
413
|
-
# This counts on order being preserved in default repository so we can avoid using an rdf:List
|
414
|
-
graph << RDF::Statement(test, EARL.assertions, a)
|
415
423
|
end
|
416
424
|
end
|
417
425
|
|
@@ -423,7 +431,7 @@ class EarlReport
|
|
423
431
|
doap:name #{quoted(name)};
|
424
432
|
dc:bibliographicCitation "#{bibRef}";
|
425
433
|
earl:generatedBy <https://rubygems.org/gems/earl-report>;
|
426
|
-
|
434
|
+
mf:report #{subjects.values.map {|f| f.to_ntriples}.join(",\n ")};
|
427
435
|
earl:testSubjects #{subjects.keys.map {|f| f.to_ntriples}.join(",\n ")};
|
428
436
|
mf:entries (#{man_uris.map {|f| f.to_ntriples}.join("\n ")}) .
|
429
437
|
).gsub(/^ /, '') +
|
@@ -432,18 +440,18 @@ class EarlReport
|
|
432
440
|
|
433
441
|
# Each manifest is an earl:Report
|
434
442
|
man_uris.each do |u|
|
435
|
-
graph << RDF::Statement.new(u, RDF.type, EARL.Report)
|
443
|
+
graph << RDF::Statement.new(u, RDF.type, RDF::Vocab::EARL.Report)
|
436
444
|
end
|
437
445
|
|
438
446
|
# Each subject is an earl:TestSubject
|
439
447
|
subjects.keys.each do |u|
|
440
|
-
graph << RDF::Statement.new(u, RDF.type, EARL.TestSubject)
|
448
|
+
graph << RDF::Statement.new(u, RDF.type, RDF::Vocab::EARL.TestSubject)
|
441
449
|
end
|
442
450
|
|
443
451
|
# Each assertion test is a earl:TestCriterion and earl:TestCase
|
444
452
|
test_resources.each do |u|
|
445
|
-
graph << RDF::Statement.new(u, RDF.type, EARL.TestCriterion)
|
446
|
-
graph << RDF::Statement.new(u, RDF.type, EARL.TestCase)
|
453
|
+
graph << RDF::Statement.new(u, RDF.type, RDF::Vocab::EARL.TestCriterion)
|
454
|
+
graph << RDF::Statement.new(u, RDF.type, RDF::Vocab::EARL.TestCase)
|
447
455
|
end
|
448
456
|
|
449
457
|
raise "Warnings issued in strict mode" if strict && @warnings > 0
|
@@ -517,7 +525,7 @@ class EarlReport
|
|
517
525
|
# Reorder test assertions to make them consistent with subject order
|
518
526
|
Array(framed['entries']).each do |manifest|
|
519
527
|
manifest['entries'].each do |test|
|
520
|
-
test['assertions'] = test['assertions'].sort_by {|a| a['subject']}
|
528
|
+
test['assertions'] = test['assertions'].sort_by {|a| a['subject'].to_s}
|
521
529
|
end
|
522
530
|
end
|
523
531
|
framed
|
@@ -575,7 +583,11 @@ class EarlReport
|
|
575
583
|
when '@type'
|
576
584
|
"a " + ttl_value(dv)
|
577
585
|
when 'assertions'
|
578
|
-
|
586
|
+
if dv.all? {|a| a.is_a?(String)}
|
587
|
+
"mf:report #{ttl_value(dv, whitespace: "\n ")}"
|
588
|
+
else
|
589
|
+
"earl:assertions #{dv.map {|a| ttl_assertion(a)}.join(", ")}"
|
590
|
+
end
|
579
591
|
when 'entries'
|
580
592
|
"mf:entries #{ttl_value({'@list' => dv}, whitespace: "\n ")}"
|
581
593
|
when 'release'
|
data/spec/earl_report_spec.rb
CHANGED
@@ -400,6 +400,10 @@ describe EarlReport do
|
|
400
400
|
end
|
401
401
|
}
|
402
402
|
|
403
|
+
it "is valid HTML" do
|
404
|
+
expect(output).to be_valid_html
|
405
|
+
end
|
406
|
+
|
403
407
|
context "parsing to RDF" do
|
404
408
|
let(:graph) do
|
405
409
|
@graph ||= begin
|
@@ -472,7 +476,7 @@ describe EarlReport do
|
|
472
476
|
doap:name "Turtle Test Results";
|
473
477
|
dc:bibliographicCitation "[[TURTLE]]";
|
474
478
|
earl:generatedBy ?generatedBy;
|
475
|
-
|
479
|
+
mf:report ?assertionFile;
|
476
480
|
earl:testSubjects <https://rubygems.org/gems/rdf-turtle>;
|
477
481
|
mf:entries (<http://example/manifest.ttl>) .
|
478
482
|
|
@@ -517,8 +521,11 @@ describe EarlReport do
|
|
517
521
|
<http://example/manifest.ttl#testeval00> a earl:TestCriterion, earl:TestCase;
|
518
522
|
mf:name "subm-test-00";
|
519
523
|
mf:action <http://example/test-00.ttl>;
|
520
|
-
mf:result <http://example/test-00.out
|
521
|
-
|
524
|
+
mf:result <http://example/test-00.out>.
|
525
|
+
[ a earl:Assertion;
|
526
|
+
earl:subject <https://rubygems.org/gems/rdf-turtle>;
|
527
|
+
earl:test <http://example/manifest.ttl#testeval00>
|
528
|
+
] .
|
522
529
|
}
|
523
530
|
)
|
524
531
|
|
data/spec/spec_helper.rb
CHANGED
@@ -5,13 +5,20 @@ require "bundler/setup"
|
|
5
5
|
require 'rspec'
|
6
6
|
require 'rspec/its'
|
7
7
|
require 'amazing_print'
|
8
|
+
require 'nokogiri'
|
8
9
|
|
9
10
|
begin
|
10
11
|
require 'simplecov'
|
11
|
-
require '
|
12
|
+
require 'simplecov-lcov'
|
13
|
+
SimpleCov::Formatter::LcovFormatter.config do |config|
|
14
|
+
#Coveralls is coverage by default/lcov. Send info results
|
15
|
+
config.report_with_single_file = true
|
16
|
+
config.single_report_path = 'coverage/lcov.info'
|
17
|
+
end
|
18
|
+
|
12
19
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
13
20
|
SimpleCov::Formatter::HTMLFormatter,
|
14
|
-
|
21
|
+
SimpleCov::Formatter::LcovFormatter
|
15
22
|
])
|
16
23
|
SimpleCov.start do
|
17
24
|
add_filter "/spec/"
|
@@ -34,3 +41,15 @@ JSON_STATE = JSON::State.new(
|
|
34
41
|
c.filter_run :focus => true
|
35
42
|
c.run_all_when_everything_filtered = true
|
36
43
|
end
|
44
|
+
|
45
|
+
RSpec::Matchers.define :be_valid_html do
|
46
|
+
match do |actual|
|
47
|
+
root = Nokogiri::HTML5(actual, max_parse_errors: 1000)
|
48
|
+
@errors = Array(root && root.errors.map(&:to_s))
|
49
|
+
@errors.empty?
|
50
|
+
end
|
51
|
+
|
52
|
+
failure_message do |actual|
|
53
|
+
"expected no errors, was #{@errors.join("\n")}"
|
54
|
+
end
|
55
|
+
end
|
data/spec/test-files/doap.ttl
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
11
11
|
doap:name "RDF::Turtle" ;
|
12
|
-
doap:homepage <
|
12
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
13
13
|
doap:license <http://creativecommons.org/publicdomain/zero/1.0/> ;
|
14
14
|
doap:shortdesc "Turtle reader/writer for Ruby."@en ;
|
15
15
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
11
11
|
doap:name "RDF::Turtle" ;
|
12
|
-
doap:homepage <
|
12
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
13
13
|
doap:license <http://creativecommons.org/publicdomain/zero/1.0/> ;
|
14
14
|
doap:shortdesc "Turtle reader/writer for Ruby."@en ;
|
15
15
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
11
11
|
doap:name "RDF::Turtle" ;
|
12
|
-
doap:homepage <
|
12
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
13
13
|
doap:license <http://creativecommons.org/publicdomain/zero/1.0/> ;
|
14
14
|
doap:shortdesc "Turtle reader/writer for Ruby."@en ;
|
15
15
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
11
11
|
doap:name "RDF::Turtle" ;
|
12
|
-
doap:homepage <
|
12
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
13
13
|
doap:license <http://creativecommons.org/publicdomain/zero/1.0/> ;
|
14
14
|
doap:shortdesc "Turtle reader/writer for Ruby."@en ;
|
15
15
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
@@ -73,8 +73,8 @@ Implementation Report
|
|
73
73
|
<h2 id='w3c-document-28-october-2015'>
|
74
74
|
<abbr title='World Wide Web Consortium'>W3C</abbr>
|
75
75
|
Document
|
76
|
-
<time class='dt-published' datetime='
|
77
|
-
|
76
|
+
<time class='dt-published' datetime='2022-03-15' property='dc:issued'>
|
77
|
+
15 March 2022
|
78
78
|
</time>
|
79
79
|
</h2>
|
80
80
|
<dl>
|
@@ -231,7 +231,7 @@ Report Generation Software
|
|
231
231
|
<span class='secno'>2.</span>
|
232
232
|
Test Manifests
|
233
233
|
</h2>
|
234
|
-
<section id='Description-for-Example-Test-Cases' resource='http://example/manifest.ttl' typeof='
|
234
|
+
<section id='Description-for-Example-Test-Cases' resource='http://example/manifest.ttl' typeof='mf:Manifest Report'>
|
235
235
|
<h2>
|
236
236
|
<span class='secno'>2.1</span>
|
237
237
|
<span property='dc:title mf:name'>Example Test Cases</span>
|
@@ -245,11 +245,11 @@ Test
|
|
245
245
|
<a href='#subj_0'>RDF::Turtle</a>
|
246
246
|
</th>
|
247
247
|
</tr>
|
248
|
-
<tr inlist='inlist' rel='mf:entries' resource='http://example/manifest.ttl#testeval00' typeof='
|
248
|
+
<tr inlist='inlist' rel='mf:entries' resource='http://example/manifest.ttl#testeval00' typeof='http://www.w3.org/ns/rdftest#TestTurtleEval TestCriterion TestCase'>
|
249
249
|
<td>
|
250
250
|
<a href='#test_1fdd82ac4caf30510cabfdb0a5987ddd'>subm-test-00</a>
|
251
251
|
</td>
|
252
|
-
<td class='PASS'
|
252
|
+
<td class='PASS' typeof='Assertion'>
|
253
253
|
<link href='https://greggkellogg.net/foaf#me' property='earl:assertedBy' />
|
254
254
|
<link href='http://example/manifest.ttl#testeval00' property='earl:test' />
|
255
255
|
<link href='https://rubygems.org/gems/rdf-turtle' property='earl:subject' />
|
@@ -261,11 +261,11 @@ PASS
|
|
261
261
|
</span>
|
262
262
|
</td>
|
263
263
|
</tr>
|
264
|
-
<tr inlist='inlist' rel='mf:entries' resource='_:
|
264
|
+
<tr inlist='inlist' rel='mf:entries' resource='_:b0' typeof='http://www.w3.org/ns/rdftest#TestTurtleEval TestCriterion TestCase'>
|
265
265
|
<td>
|
266
|
-
<a href='#
|
266
|
+
<a href='#test_9616fad74c7bf0cfba5d70f087ed0a96'>subm-test-01</a>
|
267
267
|
</td>
|
268
|
-
<td class='UNTESTED'
|
268
|
+
<td class='UNTESTED' typeof='Assertion'>
|
269
269
|
<link href='https://rubygems.org/gems/rdf-turtle' property='earl:subject' />
|
270
270
|
<span property='earl:result' typeof='TestResult'>
|
271
271
|
<span property='earl:outcome' resource='earl:untested'>
|
@@ -300,7 +300,7 @@ This report was tested using the following test subjects:
|
|
300
300
|
<span about='https://rubygems.org/gems/rdf-turtle' property='doap:name'>RDF::Turtle</span>
|
301
301
|
</a>
|
302
302
|
</dt>
|
303
|
-
<dd property='earl:testSubjects' resource='https://rubygems.org/gems/rdf-turtle' typeof='TestSubject Software
|
303
|
+
<dd property='earl:testSubjects' resource='https://rubygems.org/gems/rdf-turtle' typeof='doap:Project TestSubject Software'>
|
304
304
|
<dl>
|
305
305
|
<dt>Description</dt>
|
306
306
|
<dd lang='en' property='doap:description'>RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite.</dd>
|
@@ -310,8 +310,8 @@ This report was tested using the following test subjects:
|
|
310
310
|
<dd property='doap:programming-language'>Ruby</dd>
|
311
311
|
<dt>Home Page</dt>
|
312
312
|
<dd>
|
313
|
-
<a href='
|
314
|
-
|
313
|
+
<a href='https://ruby-rdf.github.io/rdf-turtle' property='doap:homepage'>
|
314
|
+
https://ruby-rdf.github.io/rdf-turtle
|
315
315
|
</a>
|
316
316
|
</dd>
|
317
317
|
<dt>Developer</dt>
|
@@ -346,7 +346,7 @@ Example Test Cases
|
|
346
346
|
</dd>
|
347
347
|
</dl>
|
348
348
|
</section>
|
349
|
-
<section class='appendix' id='individual-test-results' rel='xhv:related
|
349
|
+
<section class='appendix' id='individual-test-results' rel='xhv:related mf:report'>
|
350
350
|
<h2>
|
351
351
|
<span class='secno'>B.</span>
|
352
352
|
Individual Test Results
|
@@ -376,11 +376,11 @@ Test
|
|
376
376
|
<pre class='example actionDoc' property='mf:action' resource='http://example/test-00.ttl' title='subm-test-00 Input'>http://example/test-00.ttl not loaded</pre>
|
377
377
|
<pre class='example resultDoc' property='mf:result' resource='http://example/test-00.out' title='subm-test-00 Result'>http://example/test-00.out not loaded</pre>
|
378
378
|
</dd>
|
379
|
-
<dt id='
|
379
|
+
<dt id='test_9616fad74c7bf0cfba5d70f087ed0a96' resource='_:b0'>
|
380
380
|
Test
|
381
381
|
<span property='dc:title mf:name'>subm-test-01</span>
|
382
382
|
</dt>
|
383
|
-
<dd resource='_:
|
383
|
+
<dd resource='_:b0'>
|
384
384
|
<p property='dc:description rdfs:comment'></p>
|
385
385
|
<pre class='example actionDoc' property='mf:action' resource='http://example/test-01.ttl' title='subm-test-01 Input'>http://example/test-01.ttl not loaded</pre>
|
386
386
|
<pre class='example resultDoc' property='mf:result' resource='http://example/test-01.out' title='subm-test-01 Result'>http://example/test-01.out not loaded</pre>
|
@@ -399,9 +399,9 @@ This report generated by
|
|
399
399
|
<meta content='Earl Report summary generator' property='doap:shortdesc' />
|
400
400
|
<meta content='EarlReport generates HTML+RDFa rollups of multiple EARL reports' property='doap:description' />
|
401
401
|
version
|
402
|
-
<span property='doap:release' resource='https://github.com/gkellogg/earl-report/tree/0.
|
403
|
-
<span property='doap:revision'>0.
|
404
|
-
<meta content='earl-report-0.
|
402
|
+
<span property='doap:release' resource='https://github.com/gkellogg/earl-report/tree/0.8.0' typeof='doap:Version'>
|
403
|
+
<span property='doap:revision'>0.8.0</span>
|
404
|
+
<meta content='earl-report-0.8.0' property='doap:name' />
|
405
405
|
</span>
|
406
406
|
an
|
407
407
|
<a href='http://unlicense.org' property='doap:license'>Unlicensed</a>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
"@type": "@id"
|
16
16
|
},
|
17
17
|
"assertions": {
|
18
|
+
"@id": "mf:report",
|
18
19
|
"@type": "@id",
|
19
20
|
"@container": "@set"
|
20
21
|
},
|
@@ -38,6 +39,18 @@
|
|
38
39
|
"@id": "doap:description",
|
39
40
|
"@language": "en"
|
40
41
|
},
|
42
|
+
"entries": {
|
43
|
+
"@id": "mf:entries",
|
44
|
+
"@type": "@id",
|
45
|
+
"@container": "@list",
|
46
|
+
"@context": {
|
47
|
+
"assertions": {
|
48
|
+
"@reverse": "earl:test",
|
49
|
+
"@type": "@id",
|
50
|
+
"@container": "@set"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
41
54
|
"generatedBy": {
|
42
55
|
"@type": "@id"
|
43
56
|
},
|
@@ -89,11 +102,6 @@
|
|
89
102
|
"title": {
|
90
103
|
"@id": "mf:name"
|
91
104
|
},
|
92
|
-
"entries": {
|
93
|
-
"@id": "mf:entries",
|
94
|
-
"@type": "@id",
|
95
|
-
"@container": "@list"
|
96
|
-
},
|
97
105
|
"testSubjects": {
|
98
106
|
"@type": "@id",
|
99
107
|
"@container": "@set"
|
@@ -107,138 +115,138 @@
|
|
107
115
|
"Software",
|
108
116
|
"doap:Project"
|
109
117
|
],
|
118
|
+
"name": "Turtle Test Results",
|
119
|
+
"bibRef": "[[TURTLE]]",
|
120
|
+
"generatedBy": {
|
121
|
+
"@id": "https://rubygems.org/gems/earl-report",
|
122
|
+
"@type": [
|
123
|
+
"Software",
|
124
|
+
"doap:Project"
|
125
|
+
],
|
126
|
+
"name": "earl-report",
|
127
|
+
"shortdesc": "Earl Report summary generator",
|
128
|
+
"doapDesc": "EarlReport generates HTML+RDFa rollups of multiple EARL reports",
|
129
|
+
"homepage": "https://github.com/gkellogg/earl-report",
|
130
|
+
"language": "Ruby",
|
131
|
+
"license": "http://unlicense.org",
|
132
|
+
"release": {
|
133
|
+
"@id": "https://github.com/gkellogg/earl-report/tree/0.8.0",
|
134
|
+
"@type": "doap:Version",
|
135
|
+
"name": "earl-report-0.8.0",
|
136
|
+
"doap:created": {
|
137
|
+
"@type": "http://www.w3.org/2001/XMLSchema#date",
|
138
|
+
"@value": "2021-12-18"
|
139
|
+
},
|
140
|
+
"revision": "0.8.0"
|
141
|
+
},
|
142
|
+
"developer": [
|
143
|
+
{
|
144
|
+
"@id": "https://greggkellogg.net/foaf#me",
|
145
|
+
"@type": [
|
146
|
+
"foaf:Person",
|
147
|
+
"Assertor"
|
148
|
+
],
|
149
|
+
"foaf:name": "Gregg Kellogg",
|
150
|
+
"foaf:homepage": "https://greggkellogg.net/"
|
151
|
+
}
|
152
|
+
]
|
153
|
+
},
|
110
154
|
"assertions": [
|
111
155
|
"/Users/gregg/Projects/earl-report/spec/test-files/report-complete.ttl"
|
112
156
|
],
|
113
|
-
"
|
114
|
-
|
157
|
+
"testSubjects": [
|
158
|
+
{
|
159
|
+
"@id": "https://rubygems.org/gems/rdf-turtle",
|
160
|
+
"@type": [
|
161
|
+
"doap:Project",
|
162
|
+
"TestSubject",
|
163
|
+
"Software"
|
164
|
+
],
|
165
|
+
"name": "RDF::Turtle",
|
166
|
+
"developer": [
|
167
|
+
{
|
168
|
+
"@id": "https://greggkellogg.net/foaf#me",
|
169
|
+
"@type": [
|
170
|
+
"foaf:Person",
|
171
|
+
"Assertor"
|
172
|
+
],
|
173
|
+
"foaf:name": "Gregg Kellogg",
|
174
|
+
"foaf:homepage": "https://greggkellogg.net/"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"homepage": "https://ruby-rdf.github.io/rdf-turtle",
|
178
|
+
"doapDesc": "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite.",
|
179
|
+
"language": "Ruby",
|
180
|
+
"release": {
|
181
|
+
"@id": "_:b1",
|
182
|
+
"revision": "unknown"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
],
|
115
186
|
"entries": [
|
116
187
|
{
|
117
188
|
"@id": "http://example/manifest.ttl",
|
118
189
|
"@type": [
|
119
|
-
"
|
120
|
-
"
|
190
|
+
"mf:Manifest",
|
191
|
+
"Report"
|
121
192
|
],
|
122
|
-
"rdfs:comment": "Description for Example Test Cases",
|
123
193
|
"title": "Example Test Cases",
|
194
|
+
"rdfs:comment": "Description for Example Test Cases",
|
124
195
|
"entries": [
|
125
196
|
{
|
126
197
|
"@id": "http://example/manifest.ttl#testeval00",
|
127
198
|
"@type": [
|
199
|
+
"http://www.w3.org/ns/rdftest#TestTurtleEval",
|
128
200
|
"TestCriterion",
|
129
|
-
"TestCase"
|
130
|
-
"http://www.w3.org/ns/rdftest#TestTurtleEval"
|
201
|
+
"TestCase"
|
131
202
|
],
|
132
|
-
"rdfs:comment": "Blank subject",
|
133
203
|
"title": "subm-test-00",
|
204
|
+
"rdfs:comment": "Blank subject",
|
205
|
+
"testAction": "http://example/test-00.ttl",
|
206
|
+
"testResult": "http://example/test-00.out",
|
134
207
|
"assertions": [
|
135
208
|
{
|
136
|
-
"@id": "_:
|
209
|
+
"@id": "_:b2",
|
137
210
|
"@type": "Assertion",
|
138
|
-
"assertedBy": "https://greggkellogg.net/foaf#me",
|
139
211
|
"subject": "https://rubygems.org/gems/rdf-turtle",
|
212
|
+
"test": "http://example/manifest.ttl#testeval00",
|
213
|
+
"assertedBy": "https://greggkellogg.net/foaf#me",
|
214
|
+
"mode": "earl:automatic",
|
140
215
|
"result": {
|
141
|
-
"@id": "_:
|
216
|
+
"@id": "_:b3",
|
142
217
|
"@type": "TestResult",
|
143
218
|
"outcome": "earl:passed"
|
144
|
-
}
|
145
|
-
"mode": "earl:automatic",
|
146
|
-
"test": "http://example/manifest.ttl#testeval00"
|
219
|
+
}
|
147
220
|
}
|
148
|
-
]
|
149
|
-
"testResult": "http://example/test-00.out",
|
150
|
-
"testAction": "http://example/test-00.ttl"
|
221
|
+
]
|
151
222
|
},
|
152
223
|
{
|
153
|
-
"@id": "_:
|
224
|
+
"@id": "_:b0",
|
154
225
|
"@type": [
|
226
|
+
"http://www.w3.org/ns/rdftest#TestTurtleEval",
|
155
227
|
"TestCriterion",
|
156
|
-
"TestCase"
|
157
|
-
"http://www.w3.org/ns/rdftest#TestTurtleEval"
|
228
|
+
"TestCase"
|
158
229
|
],
|
159
|
-
"rdfs:comment": "@prefix and qnames",
|
160
230
|
"title": "subm-test-01",
|
231
|
+
"rdfs:comment": "@prefix and qnames",
|
232
|
+
"testAction": "http://example/test-01.ttl",
|
233
|
+
"testResult": "http://example/test-01.out",
|
161
234
|
"assertions": [
|
162
235
|
{
|
163
|
-
"@id": "_:
|
236
|
+
"@id": "_:b4",
|
164
237
|
"@type": "Assertion",
|
165
238
|
"subject": "https://rubygems.org/gems/rdf-turtle",
|
239
|
+
"test": "_:b0",
|
166
240
|
"result": {
|
167
241
|
"@id": "_:b5",
|
168
242
|
"@type": "TestResult",
|
169
243
|
"outcome": "earl:untested"
|
170
244
|
},
|
171
|
-
"test": "_:b2",
|
172
245
|
"assertedBy": null
|
173
246
|
}
|
174
|
-
]
|
175
|
-
"testResult": "http://example/test-01.out",
|
176
|
-
"testAction": "http://example/test-01.ttl"
|
247
|
+
]
|
177
248
|
}
|
178
249
|
]
|
179
250
|
}
|
180
|
-
],
|
181
|
-
"generatedBy": {
|
182
|
-
"@id": "https://rubygems.org/gems/earl-report",
|
183
|
-
"@type": [
|
184
|
-
"Software",
|
185
|
-
"doap:Project"
|
186
|
-
],
|
187
|
-
"license": "http://unlicense.org",
|
188
|
-
"developer": [
|
189
|
-
{
|
190
|
-
"@id": "https://greggkellogg.net/foaf#me",
|
191
|
-
"@type": [
|
192
|
-
"foaf:Person",
|
193
|
-
"Assertor"
|
194
|
-
],
|
195
|
-
"foaf:homepage": "https://greggkellogg.net/",
|
196
|
-
"foaf:name": "Gregg Kellogg"
|
197
|
-
}
|
198
|
-
],
|
199
|
-
"homepage": "https://github.com/gkellogg/earl-report",
|
200
|
-
"shortdesc": "Earl Report summary generator",
|
201
|
-
"doapDesc": "EarlReport generates HTML+RDFa rollups of multiple EARL reports",
|
202
|
-
"name": "earl-report",
|
203
|
-
"release": {
|
204
|
-
"@id": "https://github.com/gkellogg/earl-report/tree/0.6.1",
|
205
|
-
"@type": "doap:Version",
|
206
|
-
"doap:created": {
|
207
|
-
"@type": "http://www.w3.org/2001/XMLSchema#date",
|
208
|
-
"@value": "2021-03-19"
|
209
|
-
},
|
210
|
-
"revision": "0.6.1",
|
211
|
-
"name": "earl-report-0.6.1"
|
212
|
-
},
|
213
|
-
"language": "Ruby"
|
214
|
-
},
|
215
|
-
"testSubjects": [
|
216
|
-
{
|
217
|
-
"@id": "https://rubygems.org/gems/rdf-turtle",
|
218
|
-
"@type": [
|
219
|
-
"TestSubject",
|
220
|
-
"Software",
|
221
|
-
"doap:Project"
|
222
|
-
],
|
223
|
-
"developer": [
|
224
|
-
{
|
225
|
-
"@id": "https://greggkellogg.net/foaf#me",
|
226
|
-
"@type": [
|
227
|
-
"foaf:Person",
|
228
|
-
"Assertor"
|
229
|
-
],
|
230
|
-
"foaf:homepage": "https://greggkellogg.net/",
|
231
|
-
"foaf:name": "Gregg Kellogg"
|
232
|
-
}
|
233
|
-
],
|
234
|
-
"homepage": "http://ruby-rdf.github.com/rdf-turtle",
|
235
|
-
"language": "Ruby",
|
236
|
-
"doapDesc": "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite.",
|
237
|
-
"name": "RDF::Turtle",
|
238
|
-
"release": {
|
239
|
-
"@id": "_:b0",
|
240
|
-
"revision": "unknown"
|
241
|
-
}
|
242
|
-
}
|
243
251
|
]
|
244
252
|
}
|
data/spec/test-files/results.ttl
CHANGED
@@ -8,23 +8,25 @@
|
|
8
8
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
9
9
|
|
10
10
|
<> a earl:Software, doap:Project ;
|
11
|
-
earl:assertions </Users/gregg/Projects/earl-report/spec/test-files/report-complete.ttl> ;
|
12
|
-
dc:bibliographicCitation "[[TURTLE]]" ;
|
13
11
|
doap:name "Turtle Test Results" ;
|
14
|
-
|
12
|
+
dc:bibliographicCitation "[[TURTLE]]" ;
|
15
13
|
earl:generatedBy <https://rubygems.org/gems/earl-report> ;
|
16
|
-
|
14
|
+
mf:report </Users/gregg/Projects/earl-report/spec/test-files/report-complete.ttl> ;
|
15
|
+
earl:testSubjects <https://rubygems.org/gems/rdf-turtle> ;
|
16
|
+
mf:entries (<http://example/manifest.ttl>) .
|
17
17
|
|
18
18
|
# Manifests
|
19
|
-
<http://example/manifest.ttl> a
|
20
|
-
rdfs:comment "Description for Example Test Cases" ;
|
19
|
+
<http://example/manifest.ttl> a mf:Manifest, earl:Report ;
|
21
20
|
mf:name "Example Test Cases" ;
|
21
|
+
rdfs:comment "Description for Example Test Cases" ;
|
22
22
|
mf:entries (<http://example/manifest.ttl#testeval00>
|
23
|
-
_:
|
23
|
+
_:b0) .
|
24
24
|
|
25
|
-
<http://example/manifest.ttl#testeval00> a
|
26
|
-
rdfs:comment "Blank subject" ;
|
25
|
+
<http://example/manifest.ttl#testeval00> a <http://www.w3.org/ns/rdftest#TestTurtleEval>, earl:TestCriterion, earl:TestCase ;
|
27
26
|
mf:name "subm-test-00" ;
|
27
|
+
rdfs:comment "Blank subject" ;
|
28
|
+
mf:action <http://example/test-00.ttl> ;
|
29
|
+
mf:result <http://example/test-00.out> ;
|
28
30
|
earl:assertions [
|
29
31
|
a earl:Assertion ;
|
30
32
|
earl:test <http://example/manifest.ttl#testeval00> ;
|
@@ -34,36 +36,34 @@
|
|
34
36
|
earl:outcome earl:passed
|
35
37
|
] ;
|
36
38
|
earl:assertedBy <https://greggkellogg.net/foaf#me> ;
|
37
|
-
]
|
38
|
-
mf:result <http://example/test-00.out> ;
|
39
|
-
mf:action <http://example/test-00.ttl> .
|
39
|
+
] .
|
40
40
|
|
41
|
-
_:
|
42
|
-
rdfs:comment "@prefix and qnames" ;
|
41
|
+
_:b0 a <http://www.w3.org/ns/rdftest#TestTurtleEval>, earl:TestCriterion, earl:TestCase ;
|
43
42
|
mf:name "subm-test-01" ;
|
43
|
+
rdfs:comment "@prefix and qnames" ;
|
44
|
+
mf:action <http://example/test-01.ttl> ;
|
45
|
+
mf:result <http://example/test-01.out> ;
|
44
46
|
earl:assertions [
|
45
47
|
a earl:Assertion ;
|
46
|
-
earl:test _:
|
48
|
+
earl:test _:b0 ;
|
47
49
|
earl:subject <https://rubygems.org/gems/rdf-turtle> ;
|
48
50
|
earl:result [
|
49
51
|
a earl:TestResult ;
|
50
52
|
earl:outcome earl:untested
|
51
53
|
] ;
|
52
|
-
]
|
53
|
-
mf:result <http://example/test-01.out> ;
|
54
|
-
mf:action <http://example/test-01.ttl> .
|
54
|
+
] .
|
55
55
|
|
56
|
-
<https://rubygems.org/gems/rdf-turtle> a earl:TestSubject, earl:Software
|
56
|
+
<https://rubygems.org/gems/rdf-turtle> a doap:Project, earl:TestSubject, earl:Software ;
|
57
|
+
doap:name "RDF::Turtle" ;
|
57
58
|
doap:developer <https://greggkellogg.net/foaf#me> ;
|
58
|
-
doap:homepage <
|
59
|
-
doap:programming-language "Ruby" ;
|
59
|
+
doap:homepage <https://ruby-rdf.github.io/rdf-turtle> ;
|
60
60
|
doap:description "RDF::Turtle is an Turtle reader/writer for the RDF.rb library suite."@en ;
|
61
|
-
doap:
|
61
|
+
doap:programming-language "Ruby" ;
|
62
62
|
doap:release [doap:revision "unknown"] .
|
63
63
|
|
64
64
|
<https://greggkellogg.net/foaf#me> a foaf:Person, earl:Assertor ;
|
65
|
-
foaf:
|
66
|
-
foaf:
|
65
|
+
foaf:name "Gregg Kellogg" ;
|
66
|
+
foaf:homepage <https://greggkellogg.net/> .
|
67
67
|
|
68
68
|
|
69
69
|
# Report Generation Software
|
@@ -74,10 +74,10 @@ _:b1 a earl:TestCriterion, earl:TestCase, <http://www.w3.org/ns/rdftest#TestTurt
|
|
74
74
|
doap:homepage <https://github.com/gkellogg/earl-report>;
|
75
75
|
doap:programming-language "Ruby";
|
76
76
|
doap:license <http://unlicense.org>;
|
77
|
-
doap:release <https://github.com/gkellogg/earl-report/tree/0.
|
77
|
+
doap:release <https://github.com/gkellogg/earl-report/tree/0.8.0>;
|
78
78
|
doap:developer <https://greggkellogg.net/foaf#me> .
|
79
79
|
|
80
|
-
<https://github.com/gkellogg/earl-report/tree/0.
|
81
|
-
doap:name "earl-report-0.
|
82
|
-
doap:created "2021-
|
83
|
-
doap:revision "0.
|
80
|
+
<https://github.com/gkellogg/earl-report/tree/0.8.0> a doap:Version;
|
81
|
+
doap:name "earl-report-0.8.0";
|
82
|
+
doap:created "2021-12-18"^^xsd:date;
|
83
|
+
doap:revision "0.8.0" .
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: earl-report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -16,140 +16,140 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: rdf-
|
28
|
+
name: rdf-ordered-repo
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rdf-
|
42
|
+
name: rdf-turtle
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rdf-vocab
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: json-ld
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.2'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: sparql
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '3.2'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '3.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: haml
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '2
|
103
|
+
version: '5.2'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '2
|
110
|
+
version: '5.2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: kramdown
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.3'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '2.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: nokogiri
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
type: :
|
131
|
+
version: '1.12'
|
132
|
+
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '1.12'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rdf-rdfa
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '3.
|
145
|
+
version: '3.2'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '3.
|
152
|
+
version: '3.2'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,7 +250,11 @@ files:
|
|
250
250
|
homepage: https://github.com/gkellogg/earl-report
|
251
251
|
licenses:
|
252
252
|
- Unlicense
|
253
|
-
metadata:
|
253
|
+
metadata:
|
254
|
+
documentation_uri: https://gkellogg.github.io/earl-report
|
255
|
+
bug_tracker_uri: https://github.com/gkellogg/earl-report/issues
|
256
|
+
homepage_uri: https://github.com/gkellogg/earl-report
|
257
|
+
source_code_uri: https://github.com/gkellogg/earl-report
|
254
258
|
post_install_message:
|
255
259
|
rdoc_options: []
|
256
260
|
require_paths:
|
@@ -259,29 +263,29 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
263
|
requirements:
|
260
264
|
- - ">="
|
261
265
|
- !ruby/object:Gem::Version
|
262
|
-
version: '2.
|
266
|
+
version: '2.6'
|
263
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
268
|
requirements:
|
265
269
|
- - ">="
|
266
270
|
- !ruby/object:Gem::Version
|
267
271
|
version: '0'
|
268
272
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
273
|
+
rubygems_version: 3.0.9
|
270
274
|
signing_key:
|
271
275
|
specification_version: 4
|
272
276
|
summary: Earl Report summary generator
|
273
277
|
test_files:
|
274
|
-
- spec/earl_report_spec.rb
|
275
278
|
- spec/spec_helper.rb
|
276
|
-
- spec/
|
279
|
+
- spec/earl_report_spec.rb
|
277
280
|
- spec/test-files/foaf.ttl
|
278
281
|
- spec/test-files/manifest.ttl
|
282
|
+
- spec/test-files/doap.ttl
|
283
|
+
- spec/test-files/results.jsonld
|
284
|
+
- spec/test-files/results.ttl
|
285
|
+
- spec/test-files/report-no-test.ttl
|
279
286
|
- spec/test-files/report-complete.ttl
|
280
287
|
- spec/test-files/report-no-doap.ttl
|
281
|
-
- spec/test-files/report-no-foaf.ttl
|
282
|
-
- spec/test-files/report-no-test.ttl
|
283
288
|
- spec/test-files/results.html
|
284
|
-
- spec/test-files/
|
285
|
-
- spec/test-files/results.ttl
|
286
|
-
- spec/test-files/test-00.out
|
289
|
+
- spec/test-files/report-no-foaf.ttl
|
287
290
|
- spec/test-files/test-00.ttl
|
291
|
+
- spec/test-files/test-00.out
|