archivesspace-client 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/archivesspace/client/helpers.rb +6 -6
- data/lib/archivesspace/client/version.rb +1 -1
- 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: 0e9f5cb28d4e103f422b9679168d14615b9104f3
|
4
|
+
data.tar.gz: ec0f1fb50c060f4aa8e6f3e7db32d426d97c0936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5cf1ca6b5790c4b746a452b1ac1b8779fe9a0668e60e89c090d2c80e7a53ea6daee851619b9c9945d249bec896b65cb688605df59db8c5bbd33317f42021ebb
|
7
|
+
data.tar.gz: 6fe609191724b4fb6b742c69541b8fa02c45f1f2d166be6a7e915834a0e9e2bb7775b29d88ca7ea814b2d98a1fe92752300ae547e3875ae6386972041992821c
|
data/.gitignore
CHANGED
@@ -46,10 +46,10 @@ module ArchivesSpace
|
|
46
46
|
# create "batch_import", payload, params
|
47
47
|
end
|
48
48
|
|
49
|
-
def digital_object_to_xml(digital_object, format = "dublin_core")
|
49
|
+
def digital_object_to_xml(digital_object, format = "dublin_core", options = {})
|
50
50
|
id = digital_object["uri"].split("/")[-1]
|
51
51
|
path = "digital_objects/#{format}/#{id}.xml"
|
52
|
-
get_xml path
|
52
|
+
get_xml path, options
|
53
53
|
end
|
54
54
|
|
55
55
|
def digital_objects(format = nil, options = {}, &block)
|
@@ -121,10 +121,10 @@ module ArchivesSpace
|
|
121
121
|
#
|
122
122
|
end
|
123
123
|
|
124
|
-
def resource_to_xml(resource, format = "ead")
|
124
|
+
def resource_to_xml(resource, format = "ead", options = {})
|
125
125
|
id = resource["uri"].split("/")[-1]
|
126
126
|
path = format == "ead" ? "resource_descriptions/#{id}.xml" : "resources/#{format}/#{id}.xml"
|
127
|
-
get_xml path
|
127
|
+
get_xml path, options
|
128
128
|
end
|
129
129
|
|
130
130
|
def resources(format = nil, options = {}, &block)
|
@@ -156,9 +156,9 @@ module ArchivesSpace
|
|
156
156
|
|
157
157
|
private
|
158
158
|
|
159
|
-
def get_xml(path)
|
159
|
+
def get_xml(path, options = {})
|
160
160
|
# add xml headers
|
161
|
-
response = get(path)
|
161
|
+
response = get(path, options)
|
162
162
|
raise RequestError.new path unless response.status_code == 200
|
163
163
|
Nokogiri::XML(response.body).to_xml
|
164
164
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archivesspace-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Cooper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|