active-fedora 4.0.0.rc7 → 4.0.0.rc8

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active-fedora (4.0.0.rc7)
4
+ active-fedora (4.0.0.rc8)
5
5
  activeresource (>= 3.0.0)
6
6
  activesupport (>= 3.0.0)
7
7
  equivalent-xml
data/History.txt CHANGED
@@ -1,4 +1,4 @@
1
- 4.0.0.rc7
1
+ 4.0.0.rc8
2
2
  Removed deprecations
3
3
  * allowing :fedora level in fedora.yml
4
4
  * automatic includes of Relationships and FileMethods is removed
@@ -12,6 +12,7 @@ Find alwasy casts to the appropriate object.
12
12
  Run a stub :environment task in the fixture loading rake tasks (which is overridden by rails)
13
13
  Find raises ObjectNotFoundError when the object isn't found
14
14
  Removed dependency on solrizer-fedora
15
+ Avoid unnecessary reload of RELS-EXT when typecasting
15
16
 
16
17
  3.3.2
17
18
  HYDRA-745 No need to require :url be present on external datastreams
@@ -107,10 +107,13 @@ module ActiveFedora
107
107
  def init_with(inner_obj)
108
108
  @inner_object = inner_obj
109
109
  unless @inner_object.is_a? SolrDigitalObject
110
- ## Replace existing unchanged datastreams with the definitions found in this class
111
110
  @inner_object.original_class = self.class
111
+ ## Replace existing unchanged datastreams with the definitions found in this class if they have a different type.
112
+ ## Any datastream that is deleted here will cause a reload from fedora, so avoid it whenever possible
112
113
  ds_specs.keys.each do |key|
113
- @inner_object.datastreams.delete(key) unless @inner_object.datastreams[key].changed.include?(:content)
114
+ if !@inner_object.datastreams[key].changed.include?(:content) && @inner_object.datastreams[key].class != self.class.ds_specs[key][:type]
115
+ @inner_object.datastreams.delete(key)
116
+ end
114
117
  end
115
118
  end
116
119
  load_datastreams
@@ -4,7 +4,7 @@ module ActiveFedora
4
4
 
5
5
  included do
6
6
  class_attribute :ds_specs
7
- self.ds_specs = {'RELS-EXT'=> {:type=> ActiveFedora::RelsExtDatastream, :label=>"", :label=>"Fedora Object-to-Object Relationship Metadata", :control_group=>'X', :block=>nil}}
7
+ self.ds_specs = {'RELS-EXT'=> {:type=> ActiveFedora::RelsExtDatastream, :label=>"Fedora Object-to-Object Relationship Metadata", :control_group=>'X', :block=>nil}}
8
8
  class << self
9
9
  def inherited_with_datastreams(kls) #:nodoc:
10
10
  ## Do some inheritance logic that doesn't override Base.inherited
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "4.0.0.rc7"
2
+ VERSION = "4.0.0.rc8"
3
3
  end
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: 15424155
4
+ hash: 15424133
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 4
8
8
  - 0
9
9
  - 0
10
10
  - rc
11
- - 7
12
- version: 4.0.0.rc7
11
+ - 8
12
+ version: 4.0.0.rc8
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt