archivesspace-client 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac87676e73f32df56e132fdf948cc70f9bcaaed5
4
- data.tar.gz: 732ac0b2af6e77d00497f07d3dbd110b451bbaf6
3
+ metadata.gz: 0e9f5cb28d4e103f422b9679168d14615b9104f3
4
+ data.tar.gz: ec0f1fb50c060f4aa8e6f3e7db32d426d97c0936
5
5
  SHA512:
6
- metadata.gz: 281c55f2fc3d494817b52e95fffc64b1bbe8d50d34ecb5956608f9a781d3c1b46e7d441ccae1ae2a9988beab6ff72fb313f0cdc95c1f4034eca5794831a1f4fb
7
- data.tar.gz: 35f0ead243047aa1afb8c7fcdfd8b734872ecc7f38a3ab32a14ed08fb4f8ab6c2fc165399c2b3170268b11296d5065ef2763e9478fc0ea45089068448e667645
6
+ metadata.gz: c5cf1ca6b5790c4b746a452b1ac1b8779fe9a0668e60e89c090d2c80e7a53ea6daee851619b9c9945d249bec896b65cb688605df59db8c5bbd33317f42021ebb
7
+ data.tar.gz: 6fe609191724b4fb6b742c69541b8fa02c45f1f2d166be6a7e915834a0e9e2bb7775b29d88ca7ea814b2d98a1fe92752300ae547e3875ae6386972041992821c
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.csv
1
2
  *.gem
2
3
  *.rbc
3
4
  *.lock
@@ -19,4 +20,4 @@ spec/reports
19
20
  test/tmp
20
21
  test/version_tmp
21
22
  tmp
22
- /archivesspace/
23
+ /archivesspace/
@@ -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
@@ -1,5 +1,5 @@
1
1
  module ArchivesSpace
2
2
  class Client
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  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.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-01-25 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler