ro-bundle 0.1.0 → 0.2.0
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.
- checksums.yaml +5 -13
- data/.ruby-gemset +0 -1
- data/.ruby-version +1 -2
- data/.travis.yml +9 -1
- data/Licence.rdoc +1 -1
- data/ReadMe.rdoc +8 -7
- data/bin/dir2ro +3 -2
- data/bin/ro-bundle-info +2 -2
- data/bin/verify-ro-bundle +2 -2
- data/bin/zip2ro +2 -2
- data/lib/ro-bundle.rb +3 -2
- data/lib/ro-bundle/exceptions.rb +0 -14
- data/lib/ro-bundle/file.rb +28 -20
- data/lib/ro-bundle/ro/agent.rb +1 -1
- data/lib/ro-bundle/ro/aggregate.rb +46 -38
- data/lib/ro-bundle/ro/annotation.rb +58 -20
- data/lib/ro-bundle/ro/manifest-entry.rb +52 -0
- data/lib/ro-bundle/ro/manifest.rb +76 -38
- data/lib/ro-bundle/ro/provenance.rb +78 -11
- data/lib/ro-bundle/ro/proxy.rb +80 -0
- data/lib/ro-bundle/util.rb +1 -1
- data/lib/ro-bundle/version.rb +1 -1
- data/ro-bundle.gemspec +6 -5
- data/test/data/HelloAnyone.robundle +0 -0
- data/test/data/example3-manifest.json +7 -7
- data/test/data/example6-manifest.json +17 -0
- data/test/helpers/fake_provenance.rb +4 -1
- data/test/tc_add_annotation.rb +47 -44
- data/test/tc_aggregate.rb +70 -65
- data/test/tc_annotation.rb +70 -11
- data/test/tc_create.rb +30 -12
- data/test/tc_manifest.rb +25 -2
- data/test/tc_provenance.rb +75 -0
- data/test/tc_proxy.rb +56 -0
- data/test/tc_read.rb +4 -4
- data/test/tc_remove.rb +8 -5
- data/test/tc_util.rb +2 -1
- data/test/ts_ro_bundle.rb +3 -1
- metadata +51 -31
@@ -0,0 +1,80 @@
|
|
1
|
+
#------------------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2014 The University of Manchester, UK.
|
3
|
+
#
|
4
|
+
# BSD Licenced. See LICENCE.rdoc for details.
|
5
|
+
#
|
6
|
+
# Author: Robert Haines
|
7
|
+
#------------------------------------------------------------------------------
|
8
|
+
|
9
|
+
#
|
10
|
+
module ROBundle
|
11
|
+
|
12
|
+
# A class to represent an ORE Proxy for an Aggregate as per the specification
|
13
|
+
#of the
|
14
|
+
# {JSON structure}[https://researchobject.github.io/specifications/bundle/#json-structure]
|
15
|
+
# of the manifest.
|
16
|
+
class Proxy < ManifestEntry
|
17
|
+
|
18
|
+
# :call-seq:
|
19
|
+
# new
|
20
|
+
# new(folder)
|
21
|
+
# new(folder, filename)
|
22
|
+
#
|
23
|
+
# Create a new ORE Proxy. If +folder+ is not supplied then "/" is assumed.
|
24
|
+
def initialize(object = "", filename = nil)
|
25
|
+
super()
|
26
|
+
|
27
|
+
if object.instance_of?(Hash)
|
28
|
+
@structure = object
|
29
|
+
init_provenance_defaults(@structure)
|
30
|
+
else
|
31
|
+
@structure = {}
|
32
|
+
@structure[:uri] = UUID.generate(:urn)
|
33
|
+
@structure[:folder] = folder_slashes(object)
|
34
|
+
@structure[:filename] = filename
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# :call-seq:
|
39
|
+
# folder
|
40
|
+
#
|
41
|
+
# Return the folder field of this Proxy.
|
42
|
+
def folder
|
43
|
+
@structure[:folder]
|
44
|
+
end
|
45
|
+
|
46
|
+
# :call-seq:
|
47
|
+
# filename
|
48
|
+
#
|
49
|
+
# Return the filename field of this Proxy.
|
50
|
+
def filename
|
51
|
+
@structure[:filename]
|
52
|
+
end
|
53
|
+
|
54
|
+
# :call-seq:
|
55
|
+
# uri -> String in the form of a urn:uuid URI.
|
56
|
+
#
|
57
|
+
# Return the annotation id of this Annotation.
|
58
|
+
def uri
|
59
|
+
@structure[:uri]
|
60
|
+
end
|
61
|
+
|
62
|
+
# :call-seq:
|
63
|
+
# to_json(options = nil) -> String
|
64
|
+
#
|
65
|
+
# Write this Proxy out as a json string. Takes the same options as
|
66
|
+
# JSON#generate.
|
67
|
+
def to_json(*a)
|
68
|
+
JSON.generate(Util.clean_json(@structure),*a)
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def folder_slashes(folder)
|
74
|
+
folder = "/#{folder}" unless folder.start_with?('/')
|
75
|
+
folder = "#{folder}/" unless folder.end_with?('/')
|
76
|
+
folder
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
data/lib/ro-bundle/util.rb
CHANGED
data/lib/ro-bundle/version.rb
CHANGED
data/ro-bundle.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#------------------------------------------------------------------------------
|
2
|
-
# Copyright (c) 2014 The University of Manchester, UK.
|
2
|
+
# Copyright (c) 2014, 2015 The University of Manchester, UK.
|
3
3
|
#
|
4
4
|
# BSD Licenced. See LICENCE.rdoc for details.
|
5
5
|
#
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
"Research Object (RO) bundles."
|
20
20
|
spec.description = "This library provides an API for manipulating "\
|
21
21
|
"Research Object (RO) bundles. The RO bundle specification can be found "\
|
22
|
-
"at
|
23
|
-
spec.homepage = "http://www.
|
22
|
+
"at https://w3id.org/bundle/."
|
23
|
+
spec.homepage = "http://www.researchobject.org/"
|
24
24
|
spec.license = "BSD"
|
25
25
|
|
26
26
|
spec.files = `git ls-files`.split($/)
|
@@ -35,9 +35,10 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.required_ruby_version = ">= 1.9.3"
|
36
36
|
spec.add_development_dependency "bundler", "~> 1.5"
|
37
37
|
spec.add_development_dependency "rake", "~> 10.1"
|
38
|
-
spec.add_development_dependency
|
38
|
+
spec.add_development_dependency "rdoc", "~> 4.1"
|
39
|
+
spec.add_development_dependency "test-unit", "~> 3.0"
|
39
40
|
spec.add_development_dependency "coveralls"
|
40
|
-
spec.add_runtime_dependency "ucf", "~>
|
41
|
+
spec.add_runtime_dependency "ucf", "~> 2.0"
|
41
42
|
spec.add_runtime_dependency "json", "~> 1.8"
|
42
43
|
spec.add_runtime_dependency "uuid", "~> 2.3"
|
43
44
|
end
|
Binary file
|
@@ -11,9 +11,9 @@
|
|
11
11
|
"name": "Alice W. Land" },
|
12
12
|
"history": "evolution.ttl",
|
13
13
|
"aggregates": [
|
14
|
-
{ "
|
15
|
-
{ "uri":
|
16
|
-
{ "
|
14
|
+
{ "uri": "/folder/soup.jpeg" },
|
15
|
+
{ "uri": "http://example.com/blog/" },
|
16
|
+
{ "uri": "/README.txt",
|
17
17
|
"mediatype": "text/plain",
|
18
18
|
"createdBy": {
|
19
19
|
"uri": "http://example.com/foaf#bob",
|
@@ -21,15 +21,15 @@
|
|
21
21
|
"createdOn": "2013-02-12T19:37:32.939Z" },
|
22
22
|
{ "uri": "http://example.com/comments.txt",
|
23
23
|
"bundledAs": {
|
24
|
-
"uri":
|
24
|
+
"uri": "urn:uuid:a0cf8616-bee4-4a71-b21e-c60e6499a644",
|
25
25
|
"folder": "/folder/",
|
26
26
|
"filename": "external.txt" }
|
27
27
|
}
|
28
28
|
],
|
29
29
|
"annotations": [
|
30
|
-
{ "
|
31
|
-
"about":
|
32
|
-
"content":
|
30
|
+
{ "uri": "urn:uuid:d67466b4-3aeb-4855-8203-90febe71abdf",
|
31
|
+
"about": "/folder/soup.jpeg",
|
32
|
+
"content": "annotations/soup-properties.ttl" },
|
33
33
|
|
34
34
|
{ "about": "urn:uuid:a0cf8616-bee4-4a71-b21e-c60e6499a644",
|
35
35
|
"content": "http://example.com/blog/they-aggregated-our-file" },
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"@context": [
|
3
|
+
"https://w3id.org/bundle/context"
|
4
|
+
],
|
5
|
+
"id": "/",
|
6
|
+
"manifest": "manifest.json",
|
7
|
+
"aggregates": [
|
8
|
+
{ "uri": "http://example.com/blog/2012" },
|
9
|
+
{ "uri": "http://example.com/blog/2013" }
|
10
|
+
],
|
11
|
+
"@graph": [
|
12
|
+
{ "@id": "http://example.com/blog/2013",
|
13
|
+
"dct:replaces": "http://example.com/blog/2012" },
|
14
|
+
{ "@id": "http://example.com/blog/2012",
|
15
|
+
"dct:isReplacedBy": "http://example.com/blog/2013" }
|
16
|
+
]
|
17
|
+
}
|
@@ -25,7 +25,10 @@ class FakeProvenance
|
|
25
25
|
@structure ||= init_provenance_defaults(
|
26
26
|
{
|
27
27
|
:createdBy => { :name => "Robert Haines" },
|
28
|
-
:createdOn => "2014-08-20T11:30:00+01:00"
|
28
|
+
:createdOn => "2014-08-20T11:30:00+01:00",
|
29
|
+
:retrievedBy => { :name => "Robert Haines" },
|
30
|
+
:retrievedFrom => "http://example.org/thing",
|
31
|
+
:retrievedOn => "2014-11-10T18:30:00Z"
|
29
32
|
}
|
30
33
|
)
|
31
34
|
end
|
data/test/tc_add_annotation.rb
CHANGED
@@ -22,7 +22,7 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
22
22
|
annotation2 = ROBundle::Annotation.new(entry, uri)
|
23
23
|
annotation3 = ROBundle::Annotation.new(annotation1)
|
24
24
|
|
25
|
-
ROBundle::File.create(filename) do |b|
|
25
|
+
bundle = ROBundle::File.create(filename) do |b|
|
26
26
|
b.add_aggregate(entry, $man_ex3)
|
27
27
|
|
28
28
|
ann = b.add_annotation(annotation1)
|
@@ -33,17 +33,20 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
33
33
|
|
34
34
|
ann1, ann2, ann3 = b.annotations
|
35
35
|
|
36
|
-
assert b.annotation?(ann1.
|
36
|
+
assert b.annotation?(ann1.uri)
|
37
37
|
assert_same annotation1, ann1
|
38
38
|
|
39
|
-
assert b.annotation?(ann2.
|
39
|
+
assert b.annotation?(ann2.uri)
|
40
40
|
assert_same annotation2, ann2
|
41
41
|
assert_equal uri, ann2.content
|
42
42
|
|
43
|
-
assert b.annotation?(ann3.
|
43
|
+
assert b.annotation?(ann3.uri)
|
44
44
|
assert_same annotation3, ann3
|
45
|
+
assert b.commit_required?
|
45
46
|
end
|
46
47
|
|
48
|
+
refute bundle.commit_required?
|
49
|
+
|
47
50
|
ROBundle::File.open(filename) do |b|
|
48
51
|
refute b.aggregates.empty?
|
49
52
|
refute b.annotations.empty?
|
@@ -51,14 +54,14 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
51
54
|
|
52
55
|
ann1, ann2, ann3 = b.annotations
|
53
56
|
|
54
|
-
assert b.annotation?(ann1.
|
57
|
+
assert b.annotation?(ann1.uri)
|
55
58
|
assert_not_same annotation1, ann1
|
56
59
|
|
57
|
-
assert b.annotation?(ann2.
|
60
|
+
assert b.annotation?(ann2.uri)
|
58
61
|
assert_not_same annotation2, ann2
|
59
62
|
assert_equal uri, ann2.content
|
60
63
|
|
61
|
-
assert b.annotation?(ann3.
|
64
|
+
assert b.annotation?(ann3.uri)
|
62
65
|
assert_not_same annotation3, ann3
|
63
66
|
end
|
64
67
|
end
|
@@ -124,10 +127,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
124
127
|
|
125
128
|
ann1, ann2, ann3 = b.annotations
|
126
129
|
|
127
|
-
assert b.annotation?(ann1.
|
130
|
+
assert b.annotation?(ann1.uri)
|
128
131
|
refute b.aggregate?(ann1.content)
|
129
132
|
|
130
|
-
assert b.annotation?(ann2.
|
133
|
+
assert b.annotation?(ann2.uri)
|
131
134
|
assert b.aggregate?(ann2.content)
|
132
135
|
|
133
136
|
assert b.annotation?(ann3)
|
@@ -141,10 +144,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
141
144
|
|
142
145
|
ann1, ann2, ann3 = b.annotations
|
143
146
|
|
144
|
-
assert b.annotation?(ann1.
|
147
|
+
assert b.annotation?(ann1.uri)
|
145
148
|
refute b.aggregate?(ann1.content)
|
146
149
|
|
147
|
-
assert b.annotation?(ann2.
|
150
|
+
assert b.annotation?(ann2.uri)
|
148
151
|
assert b.aggregate?(ann2.content)
|
149
152
|
|
150
153
|
assert b.annotation?(ann3)
|
@@ -174,10 +177,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
174
177
|
|
175
178
|
ann1, ann2, ann3 = b.annotations
|
176
179
|
|
177
|
-
assert b.annotation?(ann1.
|
180
|
+
assert b.annotation?(ann1.uri)
|
178
181
|
refute b.aggregate?(ann1.content)
|
179
182
|
|
180
|
-
assert b.annotation?(ann2.
|
183
|
+
assert b.annotation?(ann2.uri)
|
181
184
|
assert b.aggregate?(ann2.content)
|
182
185
|
|
183
186
|
assert b.annotation?(ann3)
|
@@ -191,10 +194,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
191
194
|
|
192
195
|
ann1, ann2, ann3 = b.annotations
|
193
196
|
|
194
|
-
assert b.annotation?(ann1.
|
197
|
+
assert b.annotation?(ann1.uri)
|
195
198
|
refute b.aggregate?(ann1.content)
|
196
199
|
|
197
|
-
assert b.annotation?(ann2.
|
200
|
+
assert b.annotation?(ann2.uri)
|
198
201
|
assert b.aggregate?(ann2.content)
|
199
202
|
|
200
203
|
assert b.annotation?(ann3)
|
@@ -223,11 +226,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
223
226
|
|
224
227
|
ann1, ann2, ann3 = b.annotations
|
225
228
|
|
226
|
-
assert b.annotation?(ann1.
|
229
|
+
assert b.annotation?(ann1.uri)
|
227
230
|
refute b.aggregate?(ann1.content)
|
228
231
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
229
232
|
|
230
|
-
assert b.annotation?(ann2.
|
233
|
+
assert b.annotation?(ann2.uri)
|
231
234
|
assert b.aggregate?(ann2.content)
|
232
235
|
assert_equal content, b.file.read(ann2.content)
|
233
236
|
|
@@ -243,11 +246,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
243
246
|
|
244
247
|
ann1, ann2, ann3 = b.annotations
|
245
248
|
|
246
|
-
assert b.annotation?(ann1.
|
249
|
+
assert b.annotation?(ann1.uri)
|
247
250
|
refute b.aggregate?(ann1.content)
|
248
251
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
249
252
|
|
250
|
-
assert b.annotation?(ann2.
|
253
|
+
assert b.annotation?(ann2.uri)
|
251
254
|
assert b.aggregate?(ann2.content)
|
252
255
|
assert_equal content, b.file.read(ann2.content)
|
253
256
|
|
@@ -280,10 +283,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
280
283
|
|
281
284
|
ann1, ann2, ann3 = b.annotations
|
282
285
|
|
283
|
-
assert b.annotation?(ann1.
|
286
|
+
assert b.annotation?(ann1.uri)
|
284
287
|
refute b.aggregate?(ann1.content)
|
285
288
|
|
286
|
-
assert b.annotation?(ann2.
|
289
|
+
assert b.annotation?(ann2.uri)
|
287
290
|
refute b.aggregate?(uri1)
|
288
291
|
assert b.aggregate?(ann2.content)
|
289
292
|
|
@@ -298,10 +301,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
298
301
|
|
299
302
|
ann1, ann2, ann3 = b.annotations
|
300
303
|
|
301
|
-
assert b.annotation?(ann1.
|
304
|
+
assert b.annotation?(ann1.uri)
|
302
305
|
refute b.aggregate?(ann1.content)
|
303
306
|
|
304
|
-
assert b.annotation?(ann2.
|
307
|
+
assert b.annotation?(ann2.uri)
|
305
308
|
refute b.aggregate?(uri1)
|
306
309
|
assert b.aggregate?(ann2.content)
|
307
310
|
|
@@ -333,10 +336,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
333
336
|
|
334
337
|
ann1, ann2, ann3 = b.annotations
|
335
338
|
|
336
|
-
assert b.annotation?(ann1.
|
339
|
+
assert b.annotation?(ann1.uri)
|
337
340
|
refute b.aggregate?(ann1.content)
|
338
341
|
|
339
|
-
assert b.annotation?(ann2.
|
342
|
+
assert b.annotation?(ann2.uri)
|
340
343
|
refute b.aggregate?(uri1)
|
341
344
|
assert b.aggregate?(ann2.content)
|
342
345
|
|
@@ -351,10 +354,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
351
354
|
|
352
355
|
ann1, ann2, ann3 = b.annotations
|
353
356
|
|
354
|
-
assert b.annotation?(ann1.
|
357
|
+
assert b.annotation?(ann1.uri)
|
355
358
|
refute b.aggregate?(ann1.content)
|
356
359
|
|
357
|
-
assert b.annotation?(ann2.
|
360
|
+
assert b.annotation?(ann2.uri)
|
358
361
|
refute b.aggregate?(uri1)
|
359
362
|
assert b.aggregate?(ann2.content)
|
360
363
|
|
@@ -383,11 +386,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
383
386
|
|
384
387
|
ann1, ann2, ann3 = b.annotations
|
385
388
|
|
386
|
-
assert b.annotation?(ann1.
|
389
|
+
assert b.annotation?(ann1.uri)
|
387
390
|
refute b.aggregate?(ann1.content)
|
388
391
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
389
392
|
|
390
|
-
assert b.annotation?(ann2.
|
393
|
+
assert b.annotation?(ann2.uri)
|
391
394
|
assert b.aggregate?(ann2.content)
|
392
395
|
assert_equal content, b.file.read(ann2.content)
|
393
396
|
|
@@ -403,11 +406,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
403
406
|
|
404
407
|
ann1, ann2, ann3 = b.annotations
|
405
408
|
|
406
|
-
assert b.annotation?(ann1.
|
409
|
+
assert b.annotation?(ann1.uri)
|
407
410
|
refute b.aggregate?(ann1.content)
|
408
411
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
409
412
|
|
410
|
-
assert b.annotation?(ann2.
|
413
|
+
assert b.annotation?(ann2.uri)
|
411
414
|
assert b.aggregate?(ann2.content)
|
412
415
|
assert_equal content, b.file.read(ann2.content)
|
413
416
|
|
@@ -433,7 +436,7 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
433
436
|
b.add_annotation(annotation1)
|
434
437
|
b.add_annotation(annotation2)
|
435
438
|
|
436
|
-
ann = b.add_annotation(annotation1.
|
439
|
+
ann = b.add_annotation(annotation1.uri, $man_ex3)
|
437
440
|
b.add_annotation(annotation1, $man_ex3, :aggregate => true)
|
438
441
|
b.add_annotation(annotation2, entry)
|
439
442
|
|
@@ -441,10 +444,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
441
444
|
|
442
445
|
_, _, ann1, ann2, ann3 = b.annotations
|
443
446
|
|
444
|
-
assert b.annotation?(ann1.
|
447
|
+
assert b.annotation?(ann1.uri)
|
445
448
|
refute b.aggregate?(ann1.content)
|
446
449
|
|
447
|
-
assert b.annotation?(ann2.
|
450
|
+
assert b.annotation?(ann2.uri)
|
448
451
|
assert b.aggregate?(ann2.content)
|
449
452
|
|
450
453
|
assert b.annotation?(ann3)
|
@@ -458,10 +461,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
458
461
|
|
459
462
|
_, _, ann1, ann2, ann3 = b.annotations
|
460
463
|
|
461
|
-
assert b.annotation?(ann1.
|
464
|
+
assert b.annotation?(ann1.uri)
|
462
465
|
refute b.aggregate?(ann1.content)
|
463
466
|
|
464
|
-
assert b.annotation?(ann2.
|
467
|
+
assert b.annotation?(ann2.uri)
|
465
468
|
assert b.aggregate?(ann2.content)
|
466
469
|
|
467
470
|
assert b.annotation?(ann3)
|
@@ -493,10 +496,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
493
496
|
|
494
497
|
_, ann1, ann2, ann3 = b.annotations
|
495
498
|
|
496
|
-
assert b.annotation?(ann1.
|
499
|
+
assert b.annotation?(ann1.uri)
|
497
500
|
refute b.aggregate?(ann1.content)
|
498
501
|
|
499
|
-
assert b.annotation?(ann2.
|
502
|
+
assert b.annotation?(ann2.uri)
|
500
503
|
assert b.aggregate?(ann2.content)
|
501
504
|
|
502
505
|
assert b.annotation?(ann3)
|
@@ -510,10 +513,10 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
510
513
|
|
511
514
|
_, ann1, ann2, ann3 = b.annotations
|
512
515
|
|
513
|
-
assert b.annotation?(ann1.
|
516
|
+
assert b.annotation?(ann1.uri)
|
514
517
|
refute b.aggregate?(ann1.content)
|
515
518
|
|
516
|
-
assert b.annotation?(ann2.
|
519
|
+
assert b.annotation?(ann2.uri)
|
517
520
|
assert b.aggregate?(ann2.content)
|
518
521
|
|
519
522
|
assert b.annotation?(ann3)
|
@@ -541,11 +544,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
541
544
|
|
542
545
|
_, ann1, ann2 = b.annotations
|
543
546
|
|
544
|
-
assert b.annotation?(ann1.
|
547
|
+
assert b.annotation?(ann1.uri)
|
545
548
|
refute b.aggregate?(ann1.content)
|
546
549
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
547
550
|
|
548
|
-
assert b.annotation?(ann2.
|
551
|
+
assert b.annotation?(ann2.uri)
|
549
552
|
assert b.aggregate?(ann2.content)
|
550
553
|
assert_equal content, b.file.read(ann2.content)
|
551
554
|
end
|
@@ -557,11 +560,11 @@ class TestAddAnnotation < Test::Unit::TestCase
|
|
557
560
|
|
558
561
|
_, ann1, ann2 = b.annotations
|
559
562
|
|
560
|
-
assert b.annotation?(ann1.
|
563
|
+
assert b.annotation?(ann1.uri)
|
561
564
|
refute b.aggregate?(ann1.content)
|
562
565
|
assert_equal content, b.file.read(".ro/#{ann1.content}")
|
563
566
|
|
564
|
-
assert b.annotation?(ann2.
|
567
|
+
assert b.annotation?(ann2.uri)
|
565
568
|
assert b.aggregate?(ann2.content)
|
566
569
|
assert_equal content, b.file.read(ann2.content)
|
567
570
|
end
|