dor-services 5.15.0 → 5.15.1
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.
- checksums.yaml +4 -4
- data/lib/dor-services.rb +2 -1
- data/lib/dor/models/abstract.rb +5 -0
- data/lib/dor/models/identifiable.rb +14 -1
- data/lib/dor/models/item.rb +1 -10
- data/lib/dor/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee2e3a30df6e10c8613e8ca4bb85a1b333f3ebe3
|
4
|
+
data.tar.gz: 09c691788a6ea4638c79043c7bfd8c247d0fde05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6353ffe9a29cc00e13aab8cec082809f23f0fab7cf612853b33f7e3004f3847bd24186c5e1a6accf34fd391e99b00a2f2bc972aeb25d4d654724e8ec0ddb1252
|
7
|
+
data.tar.gz: 897831d91a6a4e283442032263186c5a6eaeb6a18e00b9d398ecb247f674f69619c872350759e4efc24735ee0827e31359072e7752234bbc1d199f5b73fb1075
|
data/lib/dor-services.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'active_fedora'
|
2
|
+
require 'active_fedora/version'
|
2
3
|
require 'active_support/core_ext/module/attribute_accessors'
|
3
4
|
require 'modsulator'
|
4
5
|
require 'dor/utils/sdr_client'
|
@@ -133,7 +134,7 @@ module Dor
|
|
133
134
|
|
134
135
|
eager_autoload do
|
135
136
|
# ActiveFedora Classes
|
136
|
-
autoload :Abstract, 'dor/models/
|
137
|
+
autoload :Abstract, 'dor/models/abstract'
|
137
138
|
autoload :Agreement, 'dor/models/agreement'
|
138
139
|
autoload :Item, 'dor/models/item'
|
139
140
|
autoload :Set, 'dor/models/set'
|
@@ -233,7 +233,20 @@ module Dor
|
|
233
233
|
if object_class
|
234
234
|
self.instance_of?(object_class) ? self : self.adapt_to(object_class)
|
235
235
|
else
|
236
|
-
|
236
|
+
if ActiveFedora::VERSION < '8'
|
237
|
+
result = super
|
238
|
+
if result.class == Dor::Abstract
|
239
|
+
self.adapt_to(Dor::Item)
|
240
|
+
else
|
241
|
+
result
|
242
|
+
end
|
243
|
+
else
|
244
|
+
begin
|
245
|
+
super
|
246
|
+
rescue ActiveFedora::ModelNotAsserted
|
247
|
+
self.adapt_to(Dor::Item)
|
248
|
+
end
|
249
|
+
end
|
237
250
|
end
|
238
251
|
end
|
239
252
|
|
data/lib/dor/models/item.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
module Dor
|
2
|
-
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
2
|
+
class Item < ::ActiveFedora::Base
|
5
3
|
include Processable
|
6
4
|
include Shelvable
|
7
5
|
include Embargoable # implies Publishable implies Identifiable, Describable, Governable, Rightsable ...
|
@@ -11,14 +9,7 @@ module Dor
|
|
11
9
|
include Contentable
|
12
10
|
include Geoable
|
13
11
|
include Releaseable
|
14
|
-
end
|
15
12
|
|
16
|
-
class Abstract < ::ActiveFedora::Base
|
17
|
-
include Identifiable
|
18
|
-
end
|
19
|
-
|
20
|
-
class Item < ::ActiveFedora::Base
|
21
|
-
include BasicItem
|
22
13
|
has_object_type 'item'
|
23
14
|
end
|
24
15
|
end
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.15.
|
4
|
+
version: 5.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2016-11-
|
17
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|
@@ -613,6 +613,7 @@ files:
|
|
613
613
|
- lib/dor/migrations/identifiable/uriify_contentlocation_refs.rb
|
614
614
|
- lib/dor/migrations/processable/unify_workflows.rb
|
615
615
|
- lib/dor/migrations/versionable/add_missing_version_md.rb
|
616
|
+
- lib/dor/models/abstract.rb
|
616
617
|
- lib/dor/models/admin_policy_object.rb
|
617
618
|
- lib/dor/models/agreement.rb
|
618
619
|
- lib/dor/models/assembleable.rb
|