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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fdb3946d2c50293ff73043d9c594aa0f57921fe
4
- data.tar.gz: dedcacae2de33e7bfc0de04ee19e01ff9c431443
3
+ metadata.gz: f6322cf9f4daeb23683ee292cea4da86112e62e2
4
+ data.tar.gz: 73aa61976f99ac7ead3ab4fab172f807578a9793
5
5
  SHA512:
6
- metadata.gz: 81ae91c5ffdc7578e95c4bc48da174de514a85f2f860de27b49b37c5c7bbe1dc0ce3dbc4caf612ceb0a874190de7009119a5d10c3450cec09803bacf5a72d4c4
7
- data.tar.gz: fa606c393300b056e8c1285b93358771b82588bf2f53db59043fea1f425c080fca016f8cdb3d7de35a3f587093716bc4dc673fa6b68982f0a25ef86ab6a0c4da
6
+ metadata.gz: 627b3960e120f319473ba8dfdf293e8139c6c26a802b4cbd55f0b39cddb9d3dd36d515317d1f49e357622d769d8b6de1ca8aff53c327884d3307d7786916ecfd
7
+ data.tar.gz: 0574b6c51ad45a264a93b003c459c64731577109f8091d47e33649b3ff67eb2966ee02ff6534fb4d25d991c95a9f72bc1d6a1a205dc81aba3395bed4c67a2aeb
@@ -29,6 +29,7 @@ module ActiveFedora
29
29
  def new?
30
30
  true
31
31
  end
32
+ alias new_record? new?
32
33
 
33
34
  ### Change this into a real digital object
34
35
  def save
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.7.4"
2
+ VERSION = "6.7.5"
3
3
  end
@@ -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', :new? => true)
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', :new? => true)
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', :new? => true)
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', :new? =>true), 'descMetadata') }
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', :new? =>true), 'descMetadata') }
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 = double('repository', :config=>{})
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', :new? =>true), 'descMetadata')
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(:new? => false)
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(:new? => true)
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
@@ -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::Repository.any_instance.should_receive(:object).and_raise(RestClient::ResourceNotFound)
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
@@ -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', :new? =>true), 'descMetadata')}
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', :new? =>true)).elementList.build }
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', :new? =>true)) }
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', :new? =>true), 'descMetadata')
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', :new? =>true), 'descMetadata', about:"http://library.ucsd.edu/ark:/20775/") }
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', :new? =>true), 'descMetadata')
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
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-15 00:00:00.000000000 Z
13
+ date: 2014-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr