ddr-batch 2.0.0.beta.3 → 2.0.0.beta.4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb88c80bdd36e256c998ae23cd5aa4152d583369
|
4
|
+
data.tar.gz: ff13f909b3e1f6173a2f3ec3d03beb2a3a6ba9c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18a68231aa5aeed449af52933b358a85a1351266a5a7ffa8bd835920c2f39a3fd6cd39764172d21a1a6334a4960a1a7ffdface24d009f2f57a7cb161195c3ac5
|
7
|
+
data.tar.gz: 094397923c548008387114c51f01703a488ab55640b62b8456bc0bbb2892d2f3cc829a435d875fe303a24f37ed3fd7aa9c950171fee6829a90748e2154c7ce36
|
@@ -138,8 +138,8 @@ module Ddr::Batch
|
|
138
138
|
verifications["#{r.name} relationship is correct"] = verify_relationship(repo_object, r)
|
139
139
|
end
|
140
140
|
end
|
141
|
-
result =
|
142
|
-
verifications["Fixity check"] = result.success ? VERIFICATION_PASS : VERIFICATION_FAIL
|
141
|
+
result = repo_object.check_fixity
|
142
|
+
verifications["Fixity check"] = result.success? ? VERIFICATION_PASS : VERIFICATION_FAIL
|
143
143
|
end
|
144
144
|
verifications
|
145
145
|
end
|
@@ -158,10 +158,10 @@ module Ddr::Batch
|
|
158
158
|
|
159
159
|
def verify_attribute(repo_object, attribute)
|
160
160
|
verified = case attribute.datastream
|
161
|
-
when
|
162
|
-
repo_object.
|
163
|
-
when
|
164
|
-
repo_object.
|
161
|
+
when Ddr::Models::Metadata::DESC_METADATA
|
162
|
+
repo_object.desc_metadata.values(attribute.name).include?(attribute.value)
|
163
|
+
when Ddr::Models::Metadata::ADMIN_METADATA
|
164
|
+
repo_object.admin_metadata.values(attribute.name).include?(attribute.value)
|
165
165
|
end
|
166
166
|
verified ? VERIFICATION_PASS : VERIFICATION_FAIL
|
167
167
|
end
|
@@ -219,7 +219,7 @@ module Ddr::Batch
|
|
219
219
|
|
220
220
|
def clear_attributes(repo_object, attribute)
|
221
221
|
Ddr::Models::DescriptiveMetadata.unqualified_names.each do |term|
|
222
|
-
repo_object.
|
222
|
+
repo_object.desc_metadata.set_values(term, nil) if repo_object.descMetadata.values(term)
|
223
223
|
end
|
224
224
|
return repo_object
|
225
225
|
end
|
@@ -28,7 +28,7 @@ module Ddr::Batch
|
|
28
28
|
|
29
29
|
def valid_datastream_operation
|
30
30
|
if operation == OPERATION_CLEAR_ALL
|
31
|
-
unless datastream ==
|
31
|
+
unless datastream == Ddr::Models::Metadata::DESC_METADATA
|
32
32
|
errors.add(:operation, "Operation #{operation} is not valid for #{datastream}")
|
33
33
|
end
|
34
34
|
end
|
@@ -55,14 +55,14 @@ module Ddr::Batch
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def datastream_valid?
|
58
|
-
[
|
58
|
+
[ Ddr::Models::Metadata::ADMIN_METADATA, Ddr::Models::Metadata::DESC_METADATA ].include?(datastream)
|
59
59
|
end
|
60
60
|
|
61
61
|
def attribute_name_valid?
|
62
62
|
case datastream
|
63
|
-
when
|
63
|
+
when Ddr::Models::Metadata::ADMIN_METADATA
|
64
64
|
batch_object.model.constantize.properties.include?(name)
|
65
|
-
when
|
65
|
+
when Ddr::Models::Metadata::DESC_METADATA
|
66
66
|
Ddr::Models::DescriptiveMetadata.unqualified_names.include?(name.to_sym)
|
67
67
|
end
|
68
68
|
end
|
data/lib/ddr/batch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-batch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|