iq_rdf 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -132,7 +132,7 @@ module IqRdf
132
132
  end
133
133
  end
134
134
 
135
- return triples.join("\n")
135
+ return triples.join("\n") + "\n"
136
136
  end
137
137
 
138
138
  def to_turtle
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module IqRdf
16
- VERSION = "0.1.6"
16
+ VERSION = "0.1.7"
17
17
  end
@@ -25,7 +25,7 @@ class NTriplesTest < Test::Unit::TestCase
25
25
  node.skos.related(IqRdf.bar)
26
26
  end
27
27
 
28
- assert_equal(<<-rdf.strip, document.to_ntriples)
28
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
29
29
  <http://example.org/foo> <http://www.w3.org/2004/02/skos/core#related> <http://example.org/bar> .
30
30
  rdf
31
31
 
@@ -38,11 +38,14 @@ class NTriplesTest < Test::Unit::TestCase
38
38
  t.Foaf.lastname("Testemann", :lang => :none)
39
39
  end
40
40
 
41
- assert_equal(<<-rdf.strip, document.to_ntriples)
41
+ actual = document.to_ntriples
42
+ assert_equal(<<-rdf.strip, actual.strip)
42
43
  <http://www.test.de/testemann> <http://xmlns.com/foaf/0.1/knows> <http://www.test.de/testefrau> .
43
44
  <http://www.test.de/testemann> <http://xmlns.com/foaf/0.1/nick> "Testy"@de .
44
45
  <http://www.test.de/testemann> <http://xmlns.com/foaf/0.1/lastname> "Testemann" .
45
46
  rdf
47
+
48
+ assert actual.end_with?("\n"), "trailing line break"
46
49
  end
47
50
 
48
51
  def test_full_uri_subject
@@ -53,7 +56,7 @@ class NTriplesTest < Test::Unit::TestCase
53
56
  t.sometest("testvalue")
54
57
  end
55
58
 
56
- assert_equal(<<-rdf.strip, document.to_ntriples)
59
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
57
60
  <http://www.xyz.de/#test> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.test.de/SomeType> .
58
61
  <http://www.xyz.de/#test> <http://www.test.de/sometest> "testvalue" .
59
62
  rdf
@@ -65,7 +68,7 @@ class NTriplesTest < Test::Unit::TestCase
65
68
  document << IqRdf::testemann.
66
69
  build_full_uri_predicate(URI.parse("http://www.test.org/hoho"), 42)
67
70
 
68
- assert_equal(<<-rdf.strip, document.to_ntriples)
71
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
69
72
  <http://www.test.de/testemann> <http://www.test.org/hoho> 42 .
70
73
  rdf
71
74
  end
@@ -81,7 +84,7 @@ class NTriplesTest < Test::Unit::TestCase
81
84
  end
82
85
  end
83
86
 
84
- assert_equal(<<-rdf.strip, document.to_ntriples)
87
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
85
88
  <http://www.test.de/testnode> <http://www.test.de/test32> _:b1 .
86
89
  _:b1 <http://www.test.de/title> "dies ist ein test" .
87
90
  _:b1 <http://www.test.de/test> "Another test" .
@@ -95,7 +98,7 @@ _:b2 <http://www.test.de/title> "blubb" .
95
98
 
96
99
  document << IqRdf::testemann.testIt([IqRdf::hello, IqRdf::goodbye, "bla"])
97
100
 
98
- assert_equal(<<-rdf.strip, document.to_ntriples)
101
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
99
102
  _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#List> .
100
103
  _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://test.de/hello> .
101
104
  _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b3 .
@@ -139,7 +142,7 @@ _:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "bla" .
139
142
  end
140
143
  end
141
144
 
142
- assert_equal(<<-rdf.strip, document.to_ntriples)
145
+ assert_equal(<<-rdf.strip, document.to_ntriples.strip)
143
146
  <http://www.umweltprobenbank.de/testemann> <http://www.umweltprobenbank.de/myCustomNote> "This is an example"@en .
144
147
  <http://www.umweltprobenbank.de/testemann> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
145
148
  <http://www.umweltprobenbank.de/testemann> <http://xmlns.com/foaf/0.1/name> "Heinz Peter Testemann" .
@@ -177,7 +180,7 @@ _:b2 <http://www.umweltprobenbank.de/title> "blubb"@de .
177
180
  document << IqRdf::testemann.Foaf::knows("", :suppress_if_empty => true)
178
181
  document << IqRdf::testemann.Foaf::knows([], :suppress_if_empty => true)
179
182
 
180
- assert_equal("", document.to_ntriples)
183
+ assert_equal("", document.to_ntriples.strip)
181
184
  end
182
185
 
183
186
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iq_rdf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Till Schulte-Coerne