active-fedora 4.0.0.rc19 → 4.0.0.rc20
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/Gemfile.lock +1 -1
- data/History.txt +3 -2
- data/lib/active_fedora/base.rb +2 -2
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/solr_digital_object_spec.rb +15 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
4.0.0.
|
|
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
|
|
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
|
data/lib/active_fedora/base.rb
CHANGED
|
@@ -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(
|
|
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))
|
|
@@ -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:
|
|
4
|
+
hash: 15424189
|
|
5
5
|
prerelease: 6
|
|
6
6
|
segments:
|
|
7
7
|
- 4
|
|
8
8
|
- 0
|
|
9
9
|
- 0
|
|
10
10
|
- rc
|
|
11
|
-
-
|
|
12
|
-
version: 4.0.0.
|
|
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-
|
|
22
|
+
date: 2012-04-02 00:00:00 Z
|
|
23
23
|
dependencies:
|
|
24
24
|
- !ruby/object:Gem::Dependency
|
|
25
25
|
prerelease: false
|