active-fedora 4.0.0.rc19 → 4.0.0.rc20

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active-fedora (4.0.0.rc19)
4
+ active-fedora (4.0.0.rc20)
5
5
  activeresource (>= 3.0.0)
6
6
  activesupport (>= 3.0.0)
7
7
  equivalent-xml
@@ -1,8 +1,8 @@
1
- 4.0.0.rc19
1
+ 4.0.0.rc20
2
2
  Removed deprecations
3
3
  * allowing :fedora level in fedora.yml
4
4
  * automatic includes of Relationships and FileMethods is removed
5
- Added sharding TODO add documentation
5
+ Added sharding
6
6
  Added find_document which determines the correct model and then casts the object to that.
7
7
  Improved loading from solr
8
8
  RDF datastreams
@@ -26,6 +26,7 @@ HYDRA-767 Remove Model::DEFAULT_NS
26
26
  Upgrade Om to 1.6.0
27
27
  QualifiedDublinCore now extends immediately from NokogiriDatastream
28
28
  Deprecated MetadataDatastream
29
+ HYDRA-755 Succeed with loading from solr even if the object was missing a declared datastream
29
30
 
30
31
  3.3.2
31
32
  HYDRA-745 No need to require :url be present on external datastreams
@@ -387,8 +387,8 @@ module ActiveFedora
387
387
  #need to call rels_ext once so it exists when iterating over datastreams
388
388
  obj.rels_ext
389
389
  obj.datastreams.each_value do |ds|
390
- if ds.respond_to?(:profile_from_hash)
391
- ds.profile_from_hash(profile_hash['datastreams'][ds.dsid])
390
+ if ds.respond_to?(:profile_from_hash) and (ds_prof = profile_hash['datastreams'][ds.dsid])
391
+ ds.profile_from_hash(ds_prof)
392
392
  end
393
393
  if ds.respond_to?(:from_solr)
394
394
  ds.from_solr(solr_doc) if ds.kind_of?(ActiveFedora::MetadataDatastream) || ds.kind_of?(ActiveFedora::NokogiriDatastream) || ( ds.kind_of?(ActiveFedora::RelsExtDatastream))
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "4.0.0.rc19"
2
+ VERSION = "4.0.0.rc20"
3
3
  end
@@ -33,6 +33,21 @@ describe ActiveFedora::SolrDigitalObject do
33
33
  subject.datastreams['properties'].should be_kind_of ActiveFedora::NokogiriDatastream
34
34
  end
35
35
  end
36
+
37
+ describe "with a ds spec that's not part of the solrized object" do
38
+ before do
39
+ class MissingMetadataDs < ActiveFedora::Base
40
+ has_metadata :name => "foo", :type => ActiveFedora::NokogiriDatastream, :label => 'Foo Data'
41
+ end
42
+ after do
43
+ Object.send(:remove_const, MissingMetadataDs)
44
+ end
45
+ subject { ActiveFedora::SolrDigitalObject.new({}, {'datastreams'=>{'properties'=>{'dsMIME'=>'text/xml'}}},MissingMetadataDs) }
46
+ it "should have a foo datastream" do
47
+ subject.datastreams['foo'].label.should == 'Foo Data'
48
+ end
49
+ end
50
+ end
36
51
  end
37
52
 
38
53
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424179
4
+ hash: 15424189
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 4
8
8
  - 0
9
9
  - 0
10
10
  - rc
11
- - 19
12
- version: 4.0.0.rc19
11
+ - 20
12
+ version: 4.0.0.rc20
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2012-03-30 00:00:00 Z
22
+ date: 2012-04-02 00:00:00 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  prerelease: false