active-fedora 6.7.4 → 6.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_fedora/unsaved_digital_object.rb +1 -0
- data/lib/active_fedora/version.rb +1 -1
- data/spec/integration/complex_rdf_datastream_spec.rb +3 -3
- data/spec/integration/rdf_nested_attributes_spec.rb +2 -2
- data/spec/unit/datastream_spec.rb +2 -2
- data/spec/unit/ntriples_datastream_spec.rb +2 -2
- data/spec/unit/om_datastream_spec.rb +2 -2
- data/spec/unit/query_spec.rb +2 -1
- data/spec/unit/rdf_list_spec.rb +4 -4
- data/spec/unit/rdfxml_rdf_datastream_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6322cf9f4daeb23683ee292cea4da86112e62e2
|
4
|
+
data.tar.gz: 73aa61976f99ac7ead3ab4fab172f807578a9793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 627b3960e120f319473ba8dfdf293e8139c6c26a802b4cbd55f0b39cddb9d3dd36d515317d1f49e357622d769d8b6de1ca8aff53c327884d3307d7786916ecfd
|
7
|
+
data.tar.gz: 0574b6c51ad45a264a93b003c459c64731577109f8091d47e33649b3ff67eb2966ee02ff6534fb4d25d991c95a9f72bc1d6a1a205dc81aba3395bed4c67a2aeb
|
@@ -23,7 +23,7 @@ describe "Nested Rdf Objects" do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
let (:ds) do
|
26
|
-
mock_obj = double(:mock_obj, :pid=>'test:124', :
|
26
|
+
mock_obj = double(:mock_obj, :pid=>'test:124', :new_record? => true)
|
27
27
|
ds = SpecDatastream.new(mock_obj)
|
28
28
|
end
|
29
29
|
|
@@ -161,7 +161,7 @@ END
|
|
161
161
|
end
|
162
162
|
|
163
163
|
let (:ds) do
|
164
|
-
mock_obj = double(:mock_obj, :pid=>'test:124', :
|
164
|
+
mock_obj = double(:mock_obj, :pid=>'test:124', :new_record? => true)
|
165
165
|
ds = SpecDatastream.new(mock_obj)
|
166
166
|
end
|
167
167
|
|
@@ -230,7 +230,7 @@ END
|
|
230
230
|
end
|
231
231
|
|
232
232
|
let (:ds) do
|
233
|
-
mock_obj = double(:mock_obj, :pid=>'test:124', :
|
233
|
+
mock_obj = double(:mock_obj, :pid=>'test:124', :new_record? => true)
|
234
234
|
ds = SpecDatastream.new(mock_obj)
|
235
235
|
end
|
236
236
|
|
@@ -74,7 +74,7 @@ describe "Nesting attribute behavior of RDFDatastream" do
|
|
74
74
|
Object.send(:remove_const, :ComplexRDFDatastream)
|
75
75
|
Object.send(:remove_const, :DummyMADS)
|
76
76
|
end
|
77
|
-
subject { ComplexRDFDatastream.new(double('inner object', :pid=>'foo', :
|
77
|
+
subject { ComplexRDFDatastream.new(double('inner object', :pid=>'foo', :new_record? =>true), 'descMetadata') }
|
78
78
|
let(:params) do
|
79
79
|
{ myResource:
|
80
80
|
{
|
@@ -161,7 +161,7 @@ describe "Nesting attribute behavior of RDFDatastream" do
|
|
161
161
|
after(:each) do
|
162
162
|
Object.send(:remove_const, :SpecDatastream)
|
163
163
|
end
|
164
|
-
subject { SpecDatastream.new(double('inner object', :pid=>'foo', :
|
164
|
+
subject { SpecDatastream.new(double('inner object', :pid=>'foo', :new_record? =>true), 'descMetadata') }
|
165
165
|
before do
|
166
166
|
subject.attributes = { parts_attributes: [
|
167
167
|
{label: 'Alternator'},
|
@@ -99,9 +99,9 @@ describe ActiveFedora::Datastream do
|
|
99
99
|
</datastreamProfile>"
|
100
100
|
EOS
|
101
101
|
|
102
|
-
mock_repo =
|
102
|
+
mock_repo = Rubydora::Repository.new
|
103
103
|
@test_object.inner_object.stub(:repository).and_return(mock_repo)
|
104
|
-
mock_repo.should_receive(:datastream).with(:dsid => 'abcd', :pid => @test_object.pid).and_return(ds_profile)
|
104
|
+
mock_repo.api.should_receive(:datastream).with(:dsid => 'abcd', :pid => @test_object.pid).and_return(ds_profile)
|
105
105
|
@test_datastream.size.should == 9999
|
106
106
|
end
|
107
107
|
|
@@ -14,7 +14,7 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
14
14
|
map.related_url(:to => "seeAlso", :in => RDF::RDFS)
|
15
15
|
end
|
16
16
|
end
|
17
|
-
@subject = MyDatastream.new(double('inner object', :pid=>'test:1', :
|
17
|
+
@subject = MyDatastream.new(double('inner object', :pid=>'test:1', :new_record? =>true), 'descMetadata')
|
18
18
|
@subject.content = File.new('spec/fixtures/mixed_rdf_descMetadata.nt').read
|
19
19
|
end
|
20
20
|
after do
|
@@ -101,7 +101,7 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
101
101
|
end
|
102
102
|
@subject = MyDatastream.new(@inner_object, 'mixed_rdf')
|
103
103
|
@subject.stub(:pid => 'test:1')
|
104
|
-
@subject.stub(:
|
104
|
+
@subject.stub(:new_record? => false)
|
105
105
|
@subject.content = File.new('spec/fixtures/mixed_rdf_descMetadata.nt').read
|
106
106
|
end
|
107
107
|
|
@@ -21,7 +21,7 @@ describe ActiveFedora::OmDatastream do
|
|
21
21
|
before(:each) do
|
22
22
|
@mock_inner = double('inner object')
|
23
23
|
@mock_repo = double('repository')
|
24
|
-
@mock_repo.stub(:datastream_dissemination=>'My Content', :config=>{}, :datastream=>'')
|
24
|
+
@mock_repo.stub(:datastream_dissemination=>'My Content', :config=>{}, :datastream_profile=> {}, :datastream=>'')
|
25
25
|
@mock_inner.stub(:repository).and_return(@mock_repo)
|
26
26
|
@mock_inner.stub(:pid)
|
27
27
|
@mock_inner.stub(:new? => false)
|
@@ -189,7 +189,7 @@ describe ActiveFedora::OmDatastream do
|
|
189
189
|
|
190
190
|
describe 'ng_xml=' do
|
191
191
|
before do
|
192
|
-
@mock_inner.stub(:
|
192
|
+
@mock_inner.stub(:new_record? => true)
|
193
193
|
@test_ds2 = ActiveFedora::OmDatastream.new(@mock_inner, "descMetadata")
|
194
194
|
end
|
195
195
|
it "should parse raw xml for you" do
|
data/spec/unit/query_spec.rb
CHANGED
@@ -65,7 +65,8 @@ describe ActiveFedora::Base do
|
|
65
65
|
SpecModel::Basic.find("_PID_").should be_a SpecModel::Basic
|
66
66
|
end
|
67
67
|
it "should raise an exception if it is not found" do
|
68
|
-
Rubydora::
|
68
|
+
Rubydora::Fc3Service.any_instance.should_receive(:object).and_raise(RestClient::ResourceNotFound)
|
69
|
+
|
69
70
|
SpecModel::Basic.should_receive(:connection_for_pid).with("_PID_")
|
70
71
|
lambda {SpecModel::Basic.find("_PID_")}.should raise_error ActiveFedora::ObjectNotFoundError
|
71
72
|
end
|
data/spec/unit/rdf_list_spec.rb
CHANGED
@@ -44,7 +44,7 @@ describe ActiveFedora::RdfList do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
describe "a new list" do
|
47
|
-
let (:ds) { DemoList.new(double('inner object', :pid=>'foo', :
|
47
|
+
let (:ds) { DemoList.new(double('inner object', :pid=>'foo', :new_record? =>true), 'descMetadata')}
|
48
48
|
subject { ds.elementList.build}
|
49
49
|
|
50
50
|
it "should insert at the end" do
|
@@ -106,14 +106,14 @@ END
|
|
106
106
|
end
|
107
107
|
|
108
108
|
describe "an empty list" do
|
109
|
-
subject { DemoList.new(double('inner object', :pid=>'foo', :
|
109
|
+
subject { DemoList.new(double('inner object', :pid=>'foo', :new_record? =>true)).elementList.build }
|
110
110
|
it "should have to_ary" do
|
111
111
|
subject.to_ary.should == []
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
115
|
describe "a list that has a constructed element" do
|
116
|
-
let(:ds) { DemoList.new(double('inner object', :pid=>'foo', :
|
116
|
+
let(:ds) { DemoList.new(double('inner object', :pid=>'foo', :new_record? =>true)) }
|
117
117
|
let(:list) { ds.elementList.build }
|
118
118
|
let!(:topic) { list.topicElement.build }
|
119
119
|
|
@@ -134,7 +134,7 @@ END
|
|
134
134
|
|
135
135
|
describe "a list with content" do
|
136
136
|
subject do
|
137
|
-
subject = DemoList.new(double('inner object', :pid=>'foo', :
|
137
|
+
subject = DemoList.new(double('inner object', :pid=>'foo', :new_record? =>true), 'descMetadata')
|
138
138
|
subject.content =<<END
|
139
139
|
<rdf:RDF
|
140
140
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mads="http://www.loc.gov/mads/rdf/v1#">
|
@@ -93,7 +93,7 @@ describe ActiveFedora::RdfxmlRDFDatastream do
|
|
93
93
|
end
|
94
94
|
|
95
95
|
describe "a new instance" do
|
96
|
-
subject { MyDatastream.new(double('inner object', :pid=>'test:1', :
|
96
|
+
subject { MyDatastream.new(double('inner object', :pid=>'test:1', :new_record? =>true), 'descMetadata', about:"http://library.ucsd.edu/ark:/20775/") }
|
97
97
|
it "should have a subject" do
|
98
98
|
subject.rdf_subject.to_s.should == "http://library.ucsd.edu/ark:/20775/"
|
99
99
|
end
|
@@ -102,7 +102,7 @@ describe ActiveFedora::RdfxmlRDFDatastream do
|
|
102
102
|
|
103
103
|
describe "an instance with content" do
|
104
104
|
subject do
|
105
|
-
subject = MyDatastream.new(double('inner object', :pid=>'test:1', :
|
105
|
+
subject = MyDatastream.new(double('inner object', :pid=>'test:1', :new_record? =>true), 'descMetadata')
|
106
106
|
subject.content = File.new('spec/fixtures/damsObjectModel.xml').read
|
107
107
|
subject
|
108
108
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.7.
|
4
|
+
version: 6.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-01-
|
13
|
+
date: 2014-01-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|