sdr-replication 0.4.0 → 0.4.2
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/replication/sdr_object_version.rb +11 -9
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c04fc63fa050cdbb2c45b3100ce8026ef01cb046
|
|
4
|
+
data.tar.gz: bd7d2e898a1989494086e08186e68dcd1a02b8ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0a39e7551eddff9a371594663fb097ca435d123e904a03e399b3be52a2f73fad4564c672b999e3cf562d558076e233a534f69237ac47787752eac044c29c861
|
|
7
|
+
data.tar.gz: 59e27ee6f9765c65054f57bab410e3e3d716bf775903c2d92e05ba0597c1a7f28355f2ef5438c5200d052fcfdadd73aa36ba81fe9c3a1e59d702c938bd0f2c00
|
|
@@ -79,9 +79,9 @@ module Replication
|
|
|
79
79
|
|
|
80
80
|
sdr_object_data = {
|
|
81
81
|
:sdr_object_id => digital_object_id,
|
|
82
|
-
:object_type => identity_metadata[:object_type],
|
|
83
|
-
:object_label => identity_metadata[:object_label],
|
|
84
|
-
:governing_object => relationship_metadata[:governed_by],
|
|
82
|
+
:object_type => identity_metadata[:object_type].to_s[0..19],
|
|
83
|
+
:object_label => identity_metadata[:object_label].to_s[0..99],
|
|
84
|
+
:governing_object => relationship_metadata[:governed_by].to_s,
|
|
85
85
|
:latest_version => storage_object.current_version_id
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -110,13 +110,14 @@ module Replication
|
|
|
110
110
|
|
|
111
111
|
content = version_inventory.group('content')
|
|
112
112
|
metadata = version_inventory.group('metadata')
|
|
113
|
+
raise "No metadata group found in version inventory" unless metadata
|
|
113
114
|
sdr_version_full = {
|
|
114
115
|
:sdr_object_id => digital_object_id,
|
|
115
116
|
:sdr_version_id => version_id,
|
|
116
117
|
:inventory_type => 'full',
|
|
117
|
-
:content_files => content.file_count,
|
|
118
|
-
:content_bytes => content.byte_count,
|
|
119
|
-
:content_blocks => content.block_count,
|
|
118
|
+
:content_files => (content ? content.file_count : 0),
|
|
119
|
+
:content_bytes => (content ? content.byte_count : 0),
|
|
120
|
+
:content_blocks => (content ? content.block_count : 0),
|
|
120
121
|
:metadata_files => metadata.file_count,
|
|
121
122
|
:metadata_bytes => metadata.byte_count,
|
|
122
123
|
:metadata_blocks => metadata.block_count
|
|
@@ -126,13 +127,14 @@ module Replication
|
|
|
126
127
|
version_additions = self.version_additions
|
|
127
128
|
content = version_additions.group('content')
|
|
128
129
|
metadata = version_additions.group('metadata')
|
|
130
|
+
raise "No metadata group found in version additions" unless metadata
|
|
129
131
|
sdr_version_delta = {
|
|
130
132
|
:sdr_object_id => digital_object_id,
|
|
131
133
|
:sdr_version_id => version_id,
|
|
132
134
|
:inventory_type => 'delta',
|
|
133
|
-
:content_files => content.file_count,
|
|
134
|
-
:content_bytes => content.byte_count,
|
|
135
|
-
:content_blocks => content.block_count,
|
|
135
|
+
:content_files => (content ? content.file_count : 0),
|
|
136
|
+
:content_bytes => (content ? content.byte_count : 0),
|
|
137
|
+
:content_blocks => (content ? content.block_count : 0),
|
|
136
138
|
:metadata_files => metadata.file_count,
|
|
137
139
|
:metadata_bytes => metadata.byte_count,
|
|
138
140
|
:metadata_blocks => metadata.block_count
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sdr-replication
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Anderson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json_pure
|