active-fedora 3.1.6 → 3.2.0.pre1
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.
- data/.gitignore +1 -0
- data/Gemfile.lock +22 -22
- data/History.txt +9 -3
- data/active-fedora.gemspec +3 -3
- data/config/predicate_mappings.yml +1 -0
- data/config/service_mappings.yml +9 -0
- data/lib/active_fedora.rb +7 -1
- data/lib/active_fedora/base.rb +84 -30
- data/lib/active_fedora/datastream.rb +4 -1
- data/lib/active_fedora/datastream_collections.rb +304 -293
- data/lib/active_fedora/metadata_datastream.rb +2 -24
- data/lib/active_fedora/metadata_datastream_helper.rb +32 -5
- data/lib/active_fedora/named_relationships.rb +95 -0
- data/lib/active_fedora/nested_attributes.rb +1 -1
- data/lib/active_fedora/predicates.rb +76 -0
- data/lib/active_fedora/reflection.rb +9 -1
- data/lib/active_fedora/relationship.rb +1 -0
- data/lib/active_fedora/relationship_graph.rb +152 -0
- data/lib/active_fedora/relationships_helper.rb +32 -41
- data/lib/active_fedora/rels_ext_datastream.rb +3 -10
- data/lib/active_fedora/semantic_node.rb +47 -203
- data/lib/active_fedora/service_definitions.rb +89 -0
- data/lib/active_fedora/unsaved_digital_object.rb +40 -0
- data/lib/active_fedora/version.rb +1 -1
- data/spec/integration/base_spec.rb +106 -309
- data/spec/integration/datastream_collections_spec.rb +135 -0
- data/spec/integration/rels_ext_datastream_spec.rb +14 -35
- data/spec/integration/semantic_node_spec.rb +6 -10
- data/spec/unit/base_datastream_management_spec.rb +0 -3
- data/spec/unit/base_extra_spec.rb +5 -9
- data/spec/unit/base_spec.rb +103 -57
- data/spec/unit/{base_named_datastream_spec.rb → datastream_collections_spec.rb} +107 -150
- data/spec/unit/metadata_datastream_spec.rb +0 -1
- data/spec/unit/nokogiri_datastream_spec.rb +0 -1
- data/spec/unit/predicates_spec.rb +64 -0
- data/spec/unit/qualified_dublin_core_datastream_spec.rb +0 -7
- data/spec/unit/relationship_graph_spec.rb +95 -0
- data/spec/unit/relationship_spec.rb +4 -4
- data/spec/unit/relationships_helper_spec.rb +43 -104
- data/spec/unit/rels_ext_datastream_spec.rb +6 -6
- data/spec/unit/semantic_node_spec.rb +27 -116
- data/spec/unit/service_definitions_spec.rb +52 -0
- data/spec/unit/solr_config_options_spec.rb +1 -1
- metadata +35 -17
@@ -40,7 +40,7 @@ describe ActiveFedora::RelsExtDatastream do
|
|
40
40
|
it "should generate new rdf/xml as the datastream content if the object has been changed" do
|
41
41
|
graph = RDF::Graph.new
|
42
42
|
subject = RDF::URI.new "info:fedora/test:sample_pid"
|
43
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
43
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:is_member_of), RDF::URI.new('demo:10'))
|
44
44
|
|
45
45
|
@test_ds.expects(:model).returns(stub("model", :outbound_relationships=>graph, :relationships=>graph, :relationships_are_dirty =>true, :relationships_are_dirty= => true)).times(3)
|
46
46
|
@test_ds.serialize!
|
@@ -69,11 +69,11 @@ describe ActiveFedora::RelsExtDatastream do
|
|
69
69
|
it 'should serialize the relationships array to Fedora RELS-EXT rdf/xml' do
|
70
70
|
graph = RDF::Graph.new
|
71
71
|
subject = RDF::URI.new "info:fedora/test:sample_pid"
|
72
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
73
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
74
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
75
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
76
|
-
graph.insert RDF::Statement.new(subject, ActiveFedora::
|
72
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:is_member_of), RDF::URI.new('info:fedora/demo:10'))
|
73
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:is_part_of), RDF::URI.new('info:fedora/demo:11'))
|
74
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:has_part), RDF::URI.new('info:fedora/demo:12'))
|
75
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:has_model), RDF::URI.new("info:fedora/afmodel:OtherModel"))
|
76
|
+
graph.insert RDF::Statement.new(subject, ActiveFedora::Predicates.find_graph_predicate(:has_model), RDF::URI.new("info:fedora/afmodel:SampleModel"))
|
77
77
|
|
78
78
|
@test_ds.expects(:model).returns(stub("model", :relationships=>graph, :relationships_are_dirty= => true))
|
79
79
|
EquivalentXml.equivalent?(@test_ds.to_rels_ext(), @sample_rels_ext_xml).should be_true
|
@@ -15,26 +15,7 @@ class SpecNode2
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe ActiveFedora::SemanticNode do
|
18
|
-
|
19
|
-
before do
|
20
|
-
@node = SpecNode2.new
|
21
|
-
end
|
22
|
-
it "should raise an error when the target is a pid, not a uri" do
|
23
|
-
lambda { @node.build_statement('info:fedora/spec:9', :is_part_of, 'spec:7') }.should raise_error ArgumentError
|
24
|
-
end
|
25
|
-
it "should run the happy path" do
|
26
|
-
stm = @node.build_statement('info:fedora/spec:9', :is_part_of, 'info:fedora/spec:7')
|
27
|
-
stm.object.to_s.should == "info:fedora/spec:7"
|
28
|
-
end
|
29
|
-
it "should also be happy with non-info URIs" do
|
30
|
-
stm = @node.build_statement('info:fedora/spec:9', :is_annotation_of, 'http://www.w3.org/standards/techs/rdf')
|
31
|
-
stm.object.to_s.should == "http://www.w3.org/standards/techs/rdf"
|
32
|
-
end
|
33
|
-
it "should also be happy with targets that are URI::Generics" do
|
34
|
-
stm = @node.build_statement('info:fedora/spec:9', :is_annotation_of, URI.parse('http://www.w3.org/standards/techs/rdf'))
|
35
|
-
stm.object.to_s.should == "http://www.w3.org/standards/techs/rdf"
|
36
|
-
end
|
37
|
-
end
|
18
|
+
|
38
19
|
|
39
20
|
describe "with a bunch of objects" do
|
40
21
|
def increment_pid
|
@@ -79,13 +60,6 @@ describe ActiveFedora::SemanticNode do
|
|
79
60
|
@test_object = SpecNode2.new
|
80
61
|
@test_object.pid = increment_pid
|
81
62
|
@test_object.stubs(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>''))
|
82
|
-
@stub_relationship = stub("mock_relationship", :subject => @pid, :predicate => "isMemberOf", :object => "demo:8", :class => ActiveFedora::Relationship)
|
83
|
-
@test_relationship = ActiveFedora::Relationship.new(:subject => @pid, :predicate => "isMemberOf", :object => "demo:9")
|
84
|
-
@test_relationship1 = ActiveFedora::Relationship.new(:subject => :self, :predicate => :is_member_of, :object => "demo:10")
|
85
|
-
@test_relationship2 = ActiveFedora::Relationship.new(:subject => :self, :predicate => :is_part_of, :object => "demo:11")
|
86
|
-
@test_relationship3 = ActiveFedora::Relationship.new(:subject => @pid, :predicate => :has_part, :object => "demo:12")
|
87
|
-
@test_cmodel_relationship1 = ActiveFedora::Relationship.new(:subject => @pid, :predicate => :has_model, :object => "afmodel:SampleModel")
|
88
|
-
@test_cmodel_relationship2 = ActiveFedora::Relationship.new(:subject => @pid, :predicate => "hasModel", :object => "afmodel:OtherModel")
|
89
63
|
end
|
90
64
|
|
91
65
|
after(:each) do
|
@@ -112,56 +86,6 @@ describe ActiveFedora::SemanticNode do
|
|
112
86
|
end
|
113
87
|
end
|
114
88
|
|
115
|
-
it 'should provide .default_predicate_namespace' do
|
116
|
-
SpecNode.should respond_to(:default_predicate_namespace)
|
117
|
-
SpecNode.default_predicate_namespace.should == 'info:fedora/fedora-system:def/relations-external#'
|
118
|
-
end
|
119
|
-
|
120
|
-
it 'should provide .predicate_mappings' do
|
121
|
-
SpecNode.should respond_to(:predicate_mappings)
|
122
|
-
end
|
123
|
-
|
124
|
-
describe "#predicate_mappings" do
|
125
|
-
|
126
|
-
it 'should return a hash' do
|
127
|
-
SpecNode.predicate_mappings.should be_kind_of Hash
|
128
|
-
end
|
129
|
-
|
130
|
-
it "should provide mappings to the fedora ontology via the info:fedora/fedora-system:def/relations-external default namespace mapping" do
|
131
|
-
SpecNode.predicate_mappings.keys.include?(SpecNode.default_predicate_namespace).should be_true
|
132
|
-
SpecNode.predicate_mappings[SpecNode.default_predicate_namespace].should be_kind_of Hash
|
133
|
-
end
|
134
|
-
|
135
|
-
it 'should provide predicate mappings for entire Fedora Relationship Ontology' do
|
136
|
-
desired_mappings = Hash[:is_member_of => "isMemberOf",
|
137
|
-
:has_member => "hasMember",
|
138
|
-
:is_part_of => "isPartOf",
|
139
|
-
:has_part => "hasPart",
|
140
|
-
:is_member_of_collection => "isMemberOfCollection",
|
141
|
-
:has_collection_member => "hasCollectionMember",
|
142
|
-
:is_constituent_of => "isConstituentOf",
|
143
|
-
:has_constituent => "hasConstituent",
|
144
|
-
:is_subset_of => "isSubsetOf",
|
145
|
-
:has_subset => "hasSubset",
|
146
|
-
:is_derivation_of => "isDerivationOf",
|
147
|
-
:has_derivation => "hasDerivation",
|
148
|
-
:is_dependent_of => "isDependentOf",
|
149
|
-
:has_dependent => "hasDependent",
|
150
|
-
:is_description_of => "isDescriptionOf",
|
151
|
-
:has_description => "hasDescription",
|
152
|
-
:is_metadata_for => "isMetadataFor",
|
153
|
-
:has_metadata => "hasMetadata",
|
154
|
-
:is_annotation_of => "isAnnotationOf",
|
155
|
-
:has_annotation => "hasAnnotation",
|
156
|
-
:has_equivalent => "hasEquivalent",
|
157
|
-
:conforms_to => "conformsTo",
|
158
|
-
:has_model => "hasModel"]
|
159
|
-
desired_mappings.each_pair do |k,v|
|
160
|
-
SpecNode.predicate_mappings[SpecNode.default_predicate_namespace].should have_key(k)
|
161
|
-
SpecNode.predicate_mappings[SpecNode.default_predicate_namespace][k].should == v
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
89
|
|
166
90
|
it 'should provide .internal_uri' do
|
167
91
|
@node.should respond_to(:internal_uri)
|
@@ -213,8 +137,6 @@ describe ActiveFedora::SemanticNode do
|
|
213
137
|
local_node = SpecNode.new
|
214
138
|
local_node.internal_uri = "info:fedora/#{@pid}"
|
215
139
|
|
216
|
-
# local_node.add_relationship(ActiveFedora::Relationship.new(:subject => :self, :predicate => :is_member_of, :object => "info:fedora/container:A") )
|
217
|
-
# local_node.add_relationship(ActiveFedora::Relationship.new(:subject => :self, :predicate => :is_member_of, :object => "info:fedora/container:B") )
|
218
140
|
local_node.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).at_least_once
|
219
141
|
local_node.add_relationship(:is_member_of, "info:fedora/container:A")
|
220
142
|
local_node.add_relationship(:is_member_of, "info:fedora/container:B")
|
@@ -383,7 +305,7 @@ describe ActiveFedora::SemanticNode do
|
|
383
305
|
SpecNode.create_outbound_relationship_finders("containers", :is_member_of)
|
384
306
|
local_node = SpecNode.new
|
385
307
|
local_node.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).at_least_once
|
386
|
-
local_node.add_relationship(
|
308
|
+
local_node.add_relationship(:is_member_of, "demo:10")
|
387
309
|
result = local_node.containers_ids
|
388
310
|
result.should be_instance_of(Array)
|
389
311
|
result.should include("demo:10")
|
@@ -475,32 +397,37 @@ describe ActiveFedora::SemanticNode do
|
|
475
397
|
@local_node.pid = "mypid1"
|
476
398
|
@local_node2 = SpecNode.new
|
477
399
|
@local_node2.pid = "mypid2"
|
478
|
-
|
400
|
+
model_def = ActiveFedora::ContentModel.pid_from_ruby_class(SpecNode)
|
479
401
|
@local_node.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).at_least_once
|
480
|
-
@local_node.add_relationship(
|
402
|
+
@local_node.add_relationship(:has_model, model_def)
|
481
403
|
@local_node2.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).at_least_once
|
482
|
-
@local_node2.add_relationship(
|
483
|
-
|
484
|
-
@
|
485
|
-
r3 = ActiveFedora::Relationship.new({:subject=>:self,:predicate=>:has_part,:object=>@local_node})
|
486
|
-
@local_node2.add_relationship(r3.predicate, r3.object)
|
404
|
+
@local_node2.add_relationship(:has_model, model_def)
|
405
|
+
@local_node.add_relationship(:has_part, @local_node2)
|
406
|
+
@local_node2.add_relationship(:has_part, @local_node)
|
487
407
|
@local_node.ids_for_outbound(:has_part).should == [@local_node2.pid]
|
488
408
|
@local_node.ids_for_outbound(:has_model).should == ['afmodel:SpecNode']
|
489
409
|
@local_node2.ids_for_outbound(:has_part).should == [@local_node.pid]
|
490
410
|
@local_node2.ids_for_outbound(:has_model).should == ['afmodel:SpecNode']
|
491
|
-
@local_node.relationships_by_name(false).should == {:self=>{"all_parts_outbound"=>[
|
492
|
-
@local_node2.relationships_by_name(false).should == {:self=>{"all_parts_outbound"=>[
|
411
|
+
@local_node.relationships_by_name(false).should == {:self=>{"all_parts_outbound"=>[@local_node2.internal_uri]},:inbound=>{"all_parts_inbound"=>[]}}
|
412
|
+
@local_node2.relationships_by_name(false).should == {:self=>{"all_parts_outbound"=>[@local_node.internal_uri]},:inbound=>{"all_parts_inbound"=>[]}}
|
493
413
|
end
|
494
414
|
end
|
495
415
|
|
496
416
|
describe ".add_relationship" do
|
497
417
|
it "should add relationship to the relationships graph" do
|
498
|
-
@node.add_relationship(
|
418
|
+
@node.add_relationship("isMemberOf", 'demo:9')
|
499
419
|
@node.ids_for_outbound("isMemberOf").should == ['demo:9']
|
500
420
|
end
|
421
|
+
it "should not be written into the graph until it is saved" do
|
422
|
+
@n1 = ActiveFedora::Base.new
|
423
|
+
@node.add_relationship(:has_part, @n1)
|
424
|
+
@node.relationships.statements.to_a.first.object.to_s.should == 'info:fedora/__DO_NOT_USE__'
|
425
|
+
@n1.save
|
426
|
+
@node.relationships.statements.to_a.first.object.to_s.should == @n1.internal_uri
|
427
|
+
end
|
501
428
|
|
502
429
|
it "should add a literal relationship to the relationships graph" do
|
503
|
-
@node.add_relationship(
|
430
|
+
@node.add_relationship("isMemberOf", 'demo:9', true)
|
504
431
|
@node.ids_for_outbound("isMemberOf").should == ['demo:9']
|
505
432
|
end
|
506
433
|
|
@@ -508,7 +435,7 @@ describe ActiveFedora::SemanticNode do
|
|
508
435
|
local_test_node1 = SpecNode.new
|
509
436
|
local_test_node2 = SpecNode.new
|
510
437
|
local_test_node1.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).at_least_once
|
511
|
-
local_test_node1.add_relationship(
|
438
|
+
local_test_node1.add_relationship(:is_member_of, 'demo:10')
|
512
439
|
local_test_node2.expects(:rels_ext).returns(stub('rels-ext', :content=>''))
|
513
440
|
|
514
441
|
local_test_node1.ids_for_outbound(:is_member_of).should == ["demo:10"]
|
@@ -524,21 +451,6 @@ describe ActiveFedora::SemanticNode do
|
|
524
451
|
end
|
525
452
|
|
526
453
|
end
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
it 'should provide #predicate_lookup that maps symbols to common RELS-EXT predicates' do
|
531
|
-
SpecNode.should respond_to(:predicate_lookup)
|
532
|
-
SpecNode.predicate_lookup(:is_part_of).should == "isPartOf"
|
533
|
-
SpecNode.predicate_lookup(:is_member_of).should == "isMemberOf"
|
534
|
-
SpecNode.predicate_lookup("isPartOfCollection").should == "isPartOfCollection"
|
535
|
-
SpecNode.predicate_config[:predicate_mapping].merge!({"some_namespace"=>{:has_foo=>"hasFOO"}})
|
536
|
-
SpecNode.find_predicate(:has_foo).should == ["hasFOO","some_namespace"]
|
537
|
-
SpecNode.predicate_lookup(:has_foo,"some_namespace").should == "hasFOO"
|
538
|
-
#SpecNode.predicate_lookup(:has_foo)
|
539
|
-
lambda { SpecNode.predicate_lookup(:has_foo) }.should raise_error ActiveFedora::UnregisteredPredicateError
|
540
|
-
end
|
541
|
-
|
542
454
|
|
543
455
|
it "should provide .outbound_relationships" do
|
544
456
|
@node.should respond_to(:outbound_relationships)
|
@@ -547,22 +459,21 @@ describe ActiveFedora::SemanticNode do
|
|
547
459
|
|
548
460
|
describe '#remove_relationship' do
|
549
461
|
it 'should remove a relationship from the relationships hash' do
|
550
|
-
|
551
|
-
|
552
|
-
@test_object.
|
553
|
-
@test_object.add_relationship(r.predicate, r.object)
|
554
|
-
@test_object.add_relationship(r2.predicate, r2.object)
|
462
|
+
@test_object.expects(:rels_ext).returns(stub("rels_ext", :dirty= => true, :content=>'')).times(4)
|
463
|
+
@test_object.add_relationship(:has_part, "info:fedora/3")
|
464
|
+
@test_object.add_relationship(:has_part, "info:fedora/4")
|
555
465
|
#check both are there
|
556
466
|
@test_object.ids_for_outbound(:has_part).should include "3", "4"
|
557
|
-
@test_object.remove_relationship(
|
467
|
+
@test_object.remove_relationship(:has_part, "info:fedora/3")
|
558
468
|
#check returns false if relationship does not exist and does nothing with different predicate
|
559
|
-
|
560
|
-
@test_object.remove_relationship(rBad.predicate, rBad.object)
|
469
|
+
@test_object.remove_relationship(:has_member,"info:fedora/4")
|
561
470
|
#check only one item removed
|
562
471
|
@test_object.ids_for_outbound(:has_part).should == ['4']
|
563
|
-
@test_object.remove_relationship(
|
472
|
+
@test_object.remove_relationship(:has_part,"info:fedora/4")
|
564
473
|
#check last item removed and predicate removed since now emtpy
|
565
474
|
@test_object.ids_for_outbound(:has_part).should == []
|
475
|
+
|
476
|
+
@test_object.relationships_are_dirty.should == true
|
566
477
|
|
567
478
|
end
|
568
479
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class Test < ActiveFedora::Base
|
4
|
+
include ActiveFedora::ServiceDefinitions
|
5
|
+
#has_service_definition "monkey:100"
|
6
|
+
end
|
7
|
+
|
8
|
+
describe ActiveFedora::ServiceDefinitions do
|
9
|
+
before(:each) do
|
10
|
+
mmap = <<-MMAP
|
11
|
+
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" name="Fedora MethodMap for listing collection members">
|
12
|
+
<fmm:Method operationName="getDocumentStyle1"/>
|
13
|
+
<fmm:Method operationName="getDocumentStyle2"/>
|
14
|
+
</fmm:MethodMap>
|
15
|
+
MMAP
|
16
|
+
stub_get("monkey:99")
|
17
|
+
Rubydora::Repository.any_instance.stubs(:client).returns @mock_client
|
18
|
+
Rubydora::Repository.any_instance.stubs(:datastream_dissemination).with({:pid=>'test:12',:dsid=>'METHODMAP'}).returns mmap
|
19
|
+
Test.has_service_definition "test:12"
|
20
|
+
end
|
21
|
+
describe "method lookup" do
|
22
|
+
it "should find method keys in the YAML config" do
|
23
|
+
ActiveFedora::ServiceDefinitions.lookup_method("fedora-system:3", "viewObjectProfile").should == :object_profile
|
24
|
+
end
|
25
|
+
end
|
26
|
+
describe "method creation" do
|
27
|
+
it "should create the system sdef methods" do
|
28
|
+
obj = Test.new(:pid=>"monkey:99")
|
29
|
+
(obj.respond_to? :object_profile).should == true
|
30
|
+
end
|
31
|
+
it "should create the declared sdef methods" do
|
32
|
+
obj = Test.new(:pid=>"monkey:99")
|
33
|
+
(obj.respond_to? :document_style_1).should == true
|
34
|
+
end
|
35
|
+
end
|
36
|
+
describe "generated method" do
|
37
|
+
it "should call the appropriate rubydora rest api method" do
|
38
|
+
Rubydora::Repository.any_instance.expects(:dissemination).with({:pid=>'monkey:99',:sdef=>'test:12', :method=>'getDocumentStyle1'})
|
39
|
+
#@mock_client.stubs(:[]).with('objects/monkey%3A99/methods/test%3A12/getDocumentStyle1')
|
40
|
+
obj = Test.new(:pid=>"monkey:99")
|
41
|
+
obj.document_style_1
|
42
|
+
end
|
43
|
+
it "should call the appropriate rubydora rest api method with parameters" do
|
44
|
+
Rubydora::Repository.any_instance.expects(:dissemination).with({:pid=>'monkey:99',:sdef=>'test:12', :method=>'getDocumentStyle1', :format=>'xml'})
|
45
|
+
obj = Test.new(:pid=>"monkey:99")
|
46
|
+
obj.document_style_1({:format=>'xml'})
|
47
|
+
end
|
48
|
+
it "should call the appropriate rubydora rest api method with a block" do
|
49
|
+
pending "how to mock the passed block to rubydora"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -87,8 +87,8 @@ describe ActiveFedora do
|
|
87
87
|
@test_object.save
|
88
88
|
end
|
89
89
|
it "should prevent Base.delete from deleting the corresponding Solr document if false" do
|
90
|
-
ActiveFedora::DigitalObject.any_instance.expects(:delete)
|
91
90
|
ActiveFedora::SolrService.instance.conn.expects(:delete).with(@test_object.pid).never
|
91
|
+
@test_object.inner_object.expects(:delete)
|
92
92
|
@test_object.delete
|
93
93
|
end
|
94
94
|
end
|
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 1923832043
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- pre
|
8
11
|
- 1
|
9
|
-
|
10
|
-
version: 3.1.6
|
12
|
+
version: 3.2.0.pre1
|
11
13
|
platform: ruby
|
12
14
|
authors:
|
13
15
|
- Matt Zumwalt
|
@@ -16,7 +18,7 @@ autorequire:
|
|
16
18
|
bindir: bin
|
17
19
|
cert_chain: []
|
18
20
|
|
19
|
-
date:
|
21
|
+
date: 2011-12-21 00:00:00 -06:00
|
20
22
|
default_executable:
|
21
23
|
dependencies:
|
22
24
|
- !ruby/object:Gem::Dependency
|
@@ -135,7 +137,7 @@ dependencies:
|
|
135
137
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
136
138
|
none: false
|
137
139
|
requirements:
|
138
|
-
- -
|
140
|
+
- - ">="
|
139
141
|
- !ruby/object:Gem::Version
|
140
142
|
hash: 7
|
141
143
|
segments:
|
@@ -151,7 +153,7 @@ dependencies:
|
|
151
153
|
version_requirements: &id009 !ruby/object:Gem::Requirement
|
152
154
|
none: false
|
153
155
|
requirements:
|
154
|
-
- -
|
156
|
+
- - ">="
|
155
157
|
- !ruby/object:Gem::Version
|
156
158
|
hash: 7
|
157
159
|
segments:
|
@@ -211,12 +213,12 @@ dependencies:
|
|
211
213
|
requirements:
|
212
214
|
- - ~>
|
213
215
|
- !ruby/object:Gem::Version
|
214
|
-
hash:
|
216
|
+
hash: 19
|
215
217
|
segments:
|
216
218
|
- 0
|
217
|
-
-
|
218
|
-
-
|
219
|
-
version: 0.
|
219
|
+
- 3
|
220
|
+
- 0
|
221
|
+
version: 0.3.0
|
220
222
|
requirement: *id013
|
221
223
|
- !ruby/object:Gem::Dependency
|
222
224
|
name: rdf
|
@@ -545,6 +547,7 @@ files:
|
|
545
547
|
- config/fedora.yml
|
546
548
|
- config/jetty.yml
|
547
549
|
- config/predicate_mappings.yml
|
550
|
+
- config/service_mappings.yml
|
548
551
|
- config/solr.yml
|
549
552
|
- config/solr_mappings.yml
|
550
553
|
- config/solr_mappings_af_0.1.yml
|
@@ -570,14 +573,17 @@ files:
|
|
570
573
|
- lib/active_fedora/metadata_datastream.rb
|
571
574
|
- lib/active_fedora/metadata_datastream_helper.rb
|
572
575
|
- lib/active_fedora/model.rb
|
576
|
+
- lib/active_fedora/named_relationships.rb
|
573
577
|
- lib/active_fedora/nested_attributes.rb
|
574
578
|
- lib/active_fedora/nokogiri_datastream.rb
|
579
|
+
- lib/active_fedora/predicates.rb
|
575
580
|
- lib/active_fedora/property.rb
|
576
581
|
- lib/active_fedora/qualified_dublin_core_datastream.rb
|
577
582
|
- lib/active_fedora/railtie.rb
|
578
583
|
- lib/active_fedora/rdf_xml_writer.rb
|
579
584
|
- lib/active_fedora/reflection.rb
|
580
585
|
- lib/active_fedora/relationship.rb
|
586
|
+
- lib/active_fedora/relationship_graph.rb
|
581
587
|
- lib/active_fedora/relationships_helper.rb
|
582
588
|
- lib/active_fedora/rels_ext_datastream.rb
|
583
589
|
- lib/active_fedora/rubydora_connection.rb
|
@@ -587,7 +593,9 @@ files:
|
|
587
593
|
- lib/active_fedora/samples/marpa-dc_datastream.rb
|
588
594
|
- lib/active_fedora/samples/special_thing.rb
|
589
595
|
- lib/active_fedora/semantic_node.rb
|
596
|
+
- lib/active_fedora/service_definitions.rb
|
590
597
|
- lib/active_fedora/solr_service.rb
|
598
|
+
- lib/active_fedora/unsaved_digital_object.rb
|
591
599
|
- lib/active_fedora/version.rb
|
592
600
|
- lib/ruby-fedora.rb
|
593
601
|
- lib/tasks/active_fedora.rake
|
@@ -622,6 +630,7 @@ files:
|
|
622
630
|
- spec/integration/base_loader_spec.rb
|
623
631
|
- spec/integration/base_spec.rb
|
624
632
|
- spec/integration/bug_spec.rb
|
633
|
+
- spec/integration/datastream_collections_spec.rb
|
625
634
|
- spec/integration/datastream_spec.rb
|
626
635
|
- spec/integration/full_featured_model_spec.rb
|
627
636
|
- spec/integration/metadata_datastream_helper_spec.rb
|
@@ -682,9 +691,9 @@ files:
|
|
682
691
|
- spec/unit/base_delegate_spec.rb
|
683
692
|
- spec/unit/base_extra_spec.rb
|
684
693
|
- spec/unit/base_file_management_spec.rb
|
685
|
-
- spec/unit/base_named_datastream_spec.rb
|
686
694
|
- spec/unit/base_spec.rb
|
687
695
|
- spec/unit/content_model_spec.rb
|
696
|
+
- spec/unit/datastream_collections_spec.rb
|
688
697
|
- spec/unit/datastream_concurrency_spec.rb
|
689
698
|
- spec/unit/datastream_spec.rb
|
690
699
|
- spec/unit/has_many_collection_spec.rb
|
@@ -692,14 +701,17 @@ files:
|
|
692
701
|
- spec/unit/metadata_datastream_spec.rb
|
693
702
|
- spec/unit/model_spec.rb
|
694
703
|
- spec/unit/nokogiri_datastream_spec.rb
|
704
|
+
- spec/unit/predicates_spec.rb
|
695
705
|
- spec/unit/property_spec.rb
|
696
706
|
- spec/unit/qualified_dublin_core_datastream_spec.rb
|
697
707
|
- spec/unit/rdf_xml_writer.rb
|
708
|
+
- spec/unit/relationship_graph_spec.rb
|
698
709
|
- spec/unit/relationship_spec.rb
|
699
710
|
- spec/unit/relationships_helper_spec.rb
|
700
711
|
- spec/unit/rels_ext_datastream_spec.rb
|
701
712
|
- spec/unit/rubydora_connection_spec.rb
|
702
713
|
- spec/unit/semantic_node_spec.rb
|
714
|
+
- spec/unit/service_definitions_spec.rb
|
703
715
|
- spec/unit/solr_config_options_spec.rb
|
704
716
|
- spec/unit/solr_service_spec.rb
|
705
717
|
has_rdoc: true
|
@@ -723,12 +735,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
723
735
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
724
736
|
none: false
|
725
737
|
requirements:
|
726
|
-
- - "
|
738
|
+
- - ">"
|
727
739
|
- !ruby/object:Gem::Version
|
728
|
-
hash:
|
740
|
+
hash: 25
|
729
741
|
segments:
|
730
|
-
-
|
731
|
-
|
742
|
+
- 1
|
743
|
+
- 3
|
744
|
+
- 1
|
745
|
+
version: 1.3.1
|
732
746
|
requirements: []
|
733
747
|
|
734
748
|
rubyforge_project: rubyfedora
|
@@ -759,6 +773,7 @@ test_files:
|
|
759
773
|
- spec/integration/base_loader_spec.rb
|
760
774
|
- spec/integration/base_spec.rb
|
761
775
|
- spec/integration/bug_spec.rb
|
776
|
+
- spec/integration/datastream_collections_spec.rb
|
762
777
|
- spec/integration/datastream_spec.rb
|
763
778
|
- spec/integration/full_featured_model_spec.rb
|
764
779
|
- spec/integration/metadata_datastream_helper_spec.rb
|
@@ -819,9 +834,9 @@ test_files:
|
|
819
834
|
- spec/unit/base_delegate_spec.rb
|
820
835
|
- spec/unit/base_extra_spec.rb
|
821
836
|
- spec/unit/base_file_management_spec.rb
|
822
|
-
- spec/unit/base_named_datastream_spec.rb
|
823
837
|
- spec/unit/base_spec.rb
|
824
838
|
- spec/unit/content_model_spec.rb
|
839
|
+
- spec/unit/datastream_collections_spec.rb
|
825
840
|
- spec/unit/datastream_concurrency_spec.rb
|
826
841
|
- spec/unit/datastream_spec.rb
|
827
842
|
- spec/unit/has_many_collection_spec.rb
|
@@ -829,13 +844,16 @@ test_files:
|
|
829
844
|
- spec/unit/metadata_datastream_spec.rb
|
830
845
|
- spec/unit/model_spec.rb
|
831
846
|
- spec/unit/nokogiri_datastream_spec.rb
|
847
|
+
- spec/unit/predicates_spec.rb
|
832
848
|
- spec/unit/property_spec.rb
|
833
849
|
- spec/unit/qualified_dublin_core_datastream_spec.rb
|
834
850
|
- spec/unit/rdf_xml_writer.rb
|
851
|
+
- spec/unit/relationship_graph_spec.rb
|
835
852
|
- spec/unit/relationship_spec.rb
|
836
853
|
- spec/unit/relationships_helper_spec.rb
|
837
854
|
- spec/unit/rels_ext_datastream_spec.rb
|
838
855
|
- spec/unit/rubydora_connection_spec.rb
|
839
856
|
- spec/unit/semantic_node_spec.rb
|
857
|
+
- spec/unit/service_definitions_spec.rb
|
840
858
|
- spec/unit/solr_config_options_spec.rb
|
841
859
|
- spec/unit/solr_service_spec.rb
|