earl-report 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +2 -2
  2. data/VERSION +1 -1
  3. data/lib/earl_report.rb +9 -6
  4. metadata +2 -2
data/README.md CHANGED
@@ -27,7 +27,7 @@ where .... is a list of links to test descriptions, one per line.
27
27
 
28
28
  ### Test description
29
29
 
30
- This is an example of a synatx test:
30
+ This is an example of a syntax test:
31
31
 
32
32
  <#turtle-syntax-file-01> rdf:type rdft:TestTurtlePositiveSyntax ;
33
33
  mf:name "turtle-syntax-file-01" ;
@@ -45,7 +45,7 @@ in the following form:
45
45
  [ a earl:Assertion;
46
46
  earl:assertedBy <http://greggkellogg.net/foaf#me>;
47
47
  earl:subject <http://rubygems.org/gems/rdf-turtle>;
48
- earl:test <http://dvcs.w3.org/hg/rdf/raw-file/e80b58a1a711/rdf-turtle/tests-ttl/manifest.ttl#turtle-syntax-file-01>;
48
+ earl:test <http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/tests-ttl/manifest.ttl#turtle-syntax-file-01>;
49
49
  earl:result [
50
50
  a earl:TestResult;
51
51
  earl:outcome earl:passed;
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/earl_report.rb CHANGED
@@ -187,7 +187,7 @@ class EarlReport
187
187
  assertedBy: {"@id" => "earl:assertedBy", "@type" => "@id"},
188
188
  bibRef: {"@id" => "dc: bibliographicCitation"},
189
189
  description: {"@id" => "dc:description"},
190
- developer: {"@id" => "doap:developer", "@type" => "@id"},
190
+ developer: {"@id" => "doap:developer", "@type" => "@id", "@container" => "@set"},
191
191
  homepage: {"@id" => "doap:homepage", "@type" => "@id"},
192
192
  doap_desc: {"@id" => "doap:description"},
193
193
  language: {"@id" => "doap:programming-language"},
@@ -226,11 +226,12 @@ class EarlReport
226
226
  end
227
227
  if solution[:dev_name]
228
228
  dev_type = solution[:dev_type].to_s =~ /Organization/ ? "foaf:Organization" : "foaf:Person"
229
- info['developer'] = Hash.ordered
230
- info['developer']['@id'] = solution[:developer].to_s if solution[:developer].uri?
231
- info['developer']['@type'] = dev_type
232
- info['developer']['foaf:name'] = solution[:dev_name].to_s if solution[:dev_name]
229
+ dev = {'@type' => dev_type}
230
+ dev['@id'] = solution[:developer].to_s if solution[:developer].uri?
231
+ dev['foaf:name'] = solution[:dev_name].to_s if solution[:dev_name]
232
+ (info['developer'] ||= []) << dev
233
233
  end
234
+ info['developer'] = info['developer'].uniq
234
235
  end
235
236
 
236
237
  # Map ids and values to array entries
@@ -287,7 +288,9 @@ class EarlReport
287
288
  # Iterate through assertions and add to appropriate test case
288
289
  SPARQL.execute(ASSERTION_QUERY, @graph).each do |solution|
289
290
  tc = test_cases[solution[:test].to_s]
290
- STDERR.puts "No test case found for #{solution[:test]}" unless tc
291
+ STDERR.puts "No test case found for #{solution[:test]}: #{tc.inspect}" unless tc
292
+ STDERR.puts "Must have outcome earl:passed or earl:failed: #{solution[:outcome].inspect}" unless
293
+ [EARL.passed, EARL.failed].include?(solution[:outcome])
291
294
  tc ||= {}
292
295
  subject = solution[:subject].to_s
293
296
  ta_hash = {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: earl-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2012-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: linkeddata