preservation-client 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/preservation/client/objects.rb +9 -2
- data/lib/preservation/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05d036c5889b48b53bcd21a9d86edbbcb1bfe0dee6664532d52ae4358ccb4253
|
4
|
+
data.tar.gz: 1f69f80a51334169011dbff4b2f612465d12733f38c0ba064ec1eee9d030bfc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b48324d321045fd466bf52a766dea050ea0cb82bfef4d5456bea54fd80e48d917ea698e5d3729628c7d004fba90b8425dc383f741b0d376e96de1d99904571c
|
7
|
+
data.tar.gz: c23a295b93adc88877a125535c21126c865462bc49a6241e8f7511feb0fd6b4fb6e79e3f7af6f6a574e472bcdc82a9a085ad187e931e66638dab3887e04fba95
|
data/README.md
CHANGED
@@ -67,7 +67,8 @@ druids may be with or without the "druid:" prefix - 'oo000oo0000' or 'druid:oo00
|
|
67
67
|
- `client.objects.metadata(druid: 'oo000oo0000', filepath: 'identityMetadata.xml')` - returns contents of identityMetadata.xml in most recent version of Moab object
|
68
68
|
- You may specify the version:
|
69
69
|
- `client.objects.metadata(druid: 'oo000oo0000', filepath: 'identityMetadata.xml', version: '8')` - returns contents of identityMetadata.xml in version 8 of Moab object
|
70
|
-
- `client.objects.signature_catalog(
|
70
|
+
- `client.objects.signature_catalog('oo000oo0000')` - returns latest Moab::SignatureCatalog from Moab, or new Moab::SignatureCatalog for Moab if none yet exists
|
71
|
+
|
71
72
|
|
72
73
|
### Get difference information between passed contentMetadata.xml and files in the Moab
|
73
74
|
|
@@ -70,10 +70,17 @@ module Preservation
|
|
70
70
|
file(druid, 'metadata', filepath, version)
|
71
71
|
end
|
72
72
|
|
73
|
-
# convenience method for retrieving latest
|
73
|
+
# convenience method for retrieving latest Moab::SignatureCatalog from a Moab object,
|
74
|
+
# or a newly minted Moab::SignatureCatalog if it doesn't yet exist
|
74
75
|
# @param [String] druid - with or without prefix: 'druid:ab123cd4567' OR 'ab123cd4567'
|
76
|
+
# @return [Moab::SignatureCatalog] the catalog of all files previously ingested
|
75
77
|
def signature_catalog(druid)
|
76
|
-
manifest(druid: druid, filepath: 'signatureCatalog.xml')
|
78
|
+
Moab::SignatureCatalog.parse manifest(druid: druid, filepath: 'signatureCatalog.xml')
|
79
|
+
rescue Preservation::Client::UnexpectedResponseError => e
|
80
|
+
return Moab::SignatureCatalog.new(digital_object_id: druid, version_id: 0) if
|
81
|
+
e.message.match?('404 File Not Found')
|
82
|
+
|
83
|
+
raise
|
77
84
|
end
|
78
85
|
|
79
86
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: preservation-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|