archivesspace-client 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -1
- data/README.md +27 -17
- data/archivesspace-client.gemspec +8 -8
- data/examples/export.rb +26 -8
- data/examples/password_reset.rb +2 -2
- data/examples/repo_and_user.rb +37 -20
- data/examples/test_connection.rb +17 -0
- data/lib/archivesspace/client/client.rb +3 -1
- data/lib/archivesspace/client/helpers.rb +42 -84
- data/lib/archivesspace/client/request.rb +12 -11
- data/lib/archivesspace/client/version.rb +1 -1
- data/spec/fixtures/cassettes/backend_version.yml +1 -1
- metadata +36 -37
- data/examples/perms_and_groups.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c49aac54a1b49b27bbff319aa83e0a6f7dd711a1e644324ae9d96155b06d417
|
4
|
+
data.tar.gz: bf2fa7e423165f8e03282c718fe819fa7c5836e9090ceacbcf58e642e6ea1938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ba30d239390c5066bc5a673e532fb75a3d1fc4f994a8d2726494363f919e3656a5f0d1e7cb730797cbfcf24d404c0447ea1a2243aef6fe4bb9ac1af61117dc4
|
7
|
+
data.tar.gz: 385795fdc7c63144d96696be8a39a3e6f6e4f6c95fa5040be5e9be8d7db7c6a03b4db066bc3900299bb4e05e8d3446a8fa69b9628452beb0b65b477302702ee6
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
Archivesspace Client
|
2
|
-
===
|
1
|
+
# Archivesspace Client
|
3
2
|
|
4
|
-
Interact with ArchivesSpace via
|
3
|
+
Interact with ArchivesSpace via the API.
|
5
4
|
|
6
|
-
Installation
|
7
|
-
---
|
5
|
+
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
@@ -20,10 +18,11 @@ bundle install
|
|
20
18
|
|
21
19
|
Or install it yourself as:
|
22
20
|
|
23
|
-
|
21
|
+
```bash
|
22
|
+
gem install archivesspace-client
|
23
|
+
```
|
24
24
|
|
25
|
-
Usage
|
26
|
-
---
|
25
|
+
## Usage
|
27
26
|
|
28
27
|
See the examples directory for a range of use cases.
|
29
28
|
|
@@ -37,8 +36,6 @@ client = ArchivesSpace::Client.new.login
|
|
37
36
|
|
38
37
|
**Custom configuration**
|
39
38
|
|
40
|
-
To supply custom configuration to client:
|
41
|
-
|
42
39
|
```ruby
|
43
40
|
config = ArchivesSpace::Configuration.new({
|
44
41
|
base_uri: "https://archives.university.edu/api",
|
@@ -90,8 +87,7 @@ client.get('digital_objects') # instead of "repositories/2/digital_objects" etc.
|
|
90
87
|
client.config.base_repo = ""
|
91
88
|
```
|
92
89
|
|
93
|
-
Development
|
94
|
-
---
|
90
|
+
## Development
|
95
91
|
|
96
92
|
To run the examples start a local instance of ArchivesSpace then:
|
97
93
|
|
@@ -99,7 +95,9 @@ To run the examples start a local instance of ArchivesSpace then:
|
|
99
95
|
bundle exec ruby examples/repo_and_user.rb
|
100
96
|
```
|
101
97
|
|
102
|
-
Any script placed in the examples directory with a `my_` prefix are ignored by
|
98
|
+
Any script placed in the examples directory with a `my_` prefix are ignored by
|
99
|
+
git. Follow the convention used by the existing scripts to bootstrap and
|
100
|
+
experiment away.
|
103
101
|
|
104
102
|
To run the tests:
|
105
103
|
|
@@ -107,13 +105,25 @@ To run the tests:
|
|
107
105
|
bundle exec rake
|
108
106
|
```
|
109
107
|
|
110
|
-
|
111
|
-
|
108
|
+
## Publishing
|
109
|
+
|
110
|
+
Bump version in `lib/archivesspace/client/version.rb` then:
|
111
|
+
|
112
|
+
```bash
|
113
|
+
VERSION=0.1.6
|
114
|
+
gem build archivesspace-client
|
115
|
+
git add . && git commit -m "Bump to $VERSION"
|
116
|
+
git tag v$VERSION
|
117
|
+
git push origin master
|
118
|
+
git push --tags
|
119
|
+
gem push archivesspace-client-$VERSION.gem
|
120
|
+
```
|
121
|
+
|
122
|
+
## Contributing
|
112
123
|
|
113
124
|
Bug reports and pull requests are welcome on GitHub at https://github.com/lyrasis/archivesspace-client.
|
114
125
|
|
115
|
-
License
|
116
|
-
---
|
126
|
+
## License
|
117
127
|
|
118
128
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
119
129
|
|
@@ -18,14 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler"
|
21
|
+
spec.add_development_dependency "bundler"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "rspec"
|
24
|
-
spec.add_development_dependency "vcr"
|
25
|
-
spec.add_development_dependency "webmock"
|
26
|
-
spec.add_development_dependency "awesome_print"
|
23
|
+
spec.add_development_dependency "rspec", "3.6.0"
|
24
|
+
spec.add_development_dependency "vcr", "3.0.3"
|
25
|
+
spec.add_development_dependency "webmock", "3.0.1"
|
26
|
+
spec.add_development_dependency "awesome_print", "~> 1.8.0"
|
27
27
|
|
28
|
-
spec.add_dependency "httparty"
|
29
|
-
spec.add_dependency "json"
|
30
|
-
spec.add_dependency "nokogiri"
|
28
|
+
spec.add_dependency "httparty", "0.14.0"
|
29
|
+
spec.add_dependency "json", "2.0.3"
|
30
|
+
spec.add_dependency "nokogiri", "1.10.10"
|
31
31
|
end
|
data/examples/export.rb
CHANGED
@@ -2,14 +2,32 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
|
2
2
|
require 'awesome_print'
|
3
3
|
require 'archivesspace/client'
|
4
4
|
|
5
|
-
#
|
6
|
-
|
7
|
-
|
5
|
+
# official sandbox
|
6
|
+
config = ArchivesSpace::Configuration.new({
|
7
|
+
base_uri: "http://sandbox.archivesspace.org/api",
|
8
|
+
base_repo: "",
|
9
|
+
username: "admin",
|
10
|
+
password: "admin",
|
11
|
+
page_size: 50,
|
12
|
+
throttle: 0,
|
13
|
+
verify_ssl: false,
|
14
|
+
})
|
8
15
|
|
16
|
+
client = ArchivesSpace::Client.new(config).login
|
17
|
+
client.config.throttle = 0.5
|
9
18
|
client.config.base_repo = "repositories/2"
|
10
|
-
|
11
|
-
|
12
|
-
#
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
begin
|
21
|
+
# date -d '2015-07-01 00:00:00' +'%s' # 1435734000
|
22
|
+
client.resources.each(query: { modified_since: "1435734000"}) do |resource|
|
23
|
+
# for now we are just printing ...
|
24
|
+
# but you would actually write to a zip file or whatever
|
25
|
+
id = resource['uri'].split('/')[-1]
|
26
|
+
opts = { include_unpublished: false }
|
27
|
+
response = client.get("resource_descriptions/#{id}.xml", opts)
|
28
|
+
puts Nokogiri::XML(response.body).to_xml
|
29
|
+
break
|
30
|
+
end
|
31
|
+
rescue ArchivesSpace::RequestError => ex
|
32
|
+
puts ex.message
|
15
33
|
end
|
data/examples/password_reset.rb
CHANGED
@@ -10,6 +10,6 @@ client = ArchivesSpace::Client.new.login
|
|
10
10
|
begin
|
11
11
|
client.password_reset username, password
|
12
12
|
puts "Successfully updated password for #{username}."
|
13
|
-
rescue Exception =>
|
14
|
-
puts "Failed to update password for #{username},\n#{
|
13
|
+
rescue Exception => ex
|
14
|
+
puts "Failed to update password for #{username},\n#{ex.message}"
|
15
15
|
end
|
data/examples/repo_and_user.rb
CHANGED
@@ -2,8 +2,19 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
|
2
2
|
require 'awesome_print'
|
3
3
|
require 'archivesspace/client'
|
4
4
|
|
5
|
+
# official sandbox
|
6
|
+
config = ArchivesSpace::Configuration.new({
|
7
|
+
base_uri: "http://sandbox.archivesspace.org/api",
|
8
|
+
base_repo: "",
|
9
|
+
username: "admin",
|
10
|
+
password: "admin",
|
11
|
+
page_size: 50,
|
12
|
+
throttle: 0,
|
13
|
+
verify_ssl: false,
|
14
|
+
})
|
15
|
+
|
5
16
|
# default client connection: localhost:8089, admin, admin
|
6
|
-
client = ArchivesSpace::Client.new.login
|
17
|
+
client = ArchivesSpace::Client.new(config).login
|
7
18
|
|
8
19
|
ap ArchivesSpace::Template.list # view available templates
|
9
20
|
|
@@ -13,28 +24,34 @@ repo_data = {
|
|
13
24
|
agent_contact_name: "John Doe",
|
14
25
|
}
|
15
26
|
|
16
|
-
repository = ArchivesSpace::Template.process_template(:repository_with_agent, repo_data)
|
17
|
-
response = client.post('/repositories/with_agent', repository)
|
18
|
-
if response.status_code == 201
|
19
|
-
repository = client.repositories.find { |r| r["repo_code"] == "XYZ" }
|
20
|
-
ap repository
|
21
|
-
ap client.delete(repository["uri"])
|
22
|
-
else
|
23
|
-
ap response.parsed
|
24
|
-
end
|
25
|
-
|
26
27
|
user_data = {
|
27
28
|
username: "lmessi",
|
28
29
|
name: "Lionel Messi",
|
29
30
|
is_admin: true,
|
30
31
|
}
|
32
|
+
user_password = "123456"
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
repository = ArchivesSpace::Template.process_template(:repository_with_agent, repo_data)
|
35
|
+
|
36
|
+
begin
|
37
|
+
response = client.post('/repositories/with_agent', repository)
|
38
|
+
if response.status_code.to_s =~ /^2/
|
39
|
+
repository = client.repositories.find { |r| r["repo_code"] == "XYZ" }
|
40
|
+
ap repository
|
41
|
+
ap client.delete(repository["uri"])
|
42
|
+
else
|
43
|
+
ap response.parsed
|
44
|
+
end
|
45
|
+
|
46
|
+
user = ArchivesSpace::Template.process_template(:user, user_data)
|
47
|
+
response = client.post('users', user, { password: user_password })
|
48
|
+
if response.status_code.to_s =~ /^2/
|
49
|
+
user = client.users.find { |r| r["username"] == "lmessi" }
|
50
|
+
ap user
|
51
|
+
ap client.delete user["uri"]
|
52
|
+
else
|
53
|
+
ap response.parsed
|
54
|
+
end
|
55
|
+
rescue ArchivesSpace::RequestError => ex
|
56
|
+
puts ex.message
|
57
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
+
require 'awesome_print'
|
3
|
+
require 'archivesspace/client'
|
4
|
+
|
5
|
+
# official sandbox
|
6
|
+
config = ArchivesSpace::Configuration.new({
|
7
|
+
base_uri: "http://sandbox.archivesspace.org/api",
|
8
|
+
base_repo: "",
|
9
|
+
username: "admin",
|
10
|
+
password: "admin",
|
11
|
+
page_size: 50,
|
12
|
+
throttle: 0,
|
13
|
+
verify_ssl: false,
|
14
|
+
})
|
15
|
+
|
16
|
+
client = ArchivesSpace::Client.new(config).login
|
17
|
+
puts client.get("version").body
|
@@ -6,7 +6,9 @@ module ArchivesSpace
|
|
6
6
|
attr_reader :config
|
7
7
|
|
8
8
|
def initialize(config = Configuration.new)
|
9
|
-
|
9
|
+
unless config.kind_of? ArchivesSpace::Configuration
|
10
|
+
raise "Invalid configuration object"
|
11
|
+
end
|
10
12
|
@config = config
|
11
13
|
@token = nil
|
12
14
|
end
|
@@ -10,32 +10,37 @@ module ArchivesSpace
|
|
10
10
|
|
11
11
|
module Helpers
|
12
12
|
|
13
|
-
def accessions(options = {}
|
14
|
-
|
15
|
-
yield record if block_given?
|
16
|
-
end
|
17
|
-
records
|
13
|
+
def accessions(options = {})
|
14
|
+
all('accessions', options)
|
18
15
|
end
|
19
16
|
|
20
|
-
def all(path, options = {}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
17
|
+
def all(path, options = {})
|
18
|
+
Enumerator.new do |yielder|
|
19
|
+
page = 1
|
20
|
+
unlimited_listing = false
|
21
|
+
loop do
|
22
|
+
result = get(path, options.merge(query: { page: page }))
|
23
|
+
results = []
|
24
|
+
|
25
|
+
if result.parsed.respond_to?(:key) && result.parsed.key?('results')
|
26
|
+
results = result.parsed['results']
|
27
|
+
else
|
28
|
+
results = result.parsed
|
29
|
+
unlimited_listing = true
|
30
|
+
end
|
31
|
+
|
32
|
+
if results.any?
|
33
|
+
results.each do |i|
|
34
|
+
yielder << i
|
35
|
+
end
|
36
|
+
raise StopIteration if unlimited_listing
|
37
|
+
|
38
|
+
page += 1
|
39
|
+
else
|
40
|
+
raise StopIteration
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end.lazy
|
39
44
|
end
|
40
45
|
|
41
46
|
def backend_version
|
@@ -46,31 +51,17 @@ module ArchivesSpace
|
|
46
51
|
# create "batch_import", payload, params
|
47
52
|
end
|
48
53
|
|
49
|
-
def
|
50
|
-
|
51
|
-
path = "digital_objects/#{format}/#{id}.xml"
|
52
|
-
get_xml path
|
53
|
-
end
|
54
|
-
|
55
|
-
def digital_objects(format = nil, options = {}, &block)
|
56
|
-
path = "digital_objects"
|
57
|
-
format = format ? "#{path}/#{format}" : nil
|
58
|
-
records = all(path, options.merge({ format: format })) do |record|
|
59
|
-
yield record if block_given?
|
60
|
-
end
|
61
|
-
records
|
54
|
+
def digital_objects(options = {})
|
55
|
+
all('digital_objects', options)
|
62
56
|
end
|
63
57
|
|
64
|
-
def groups
|
65
|
-
|
66
|
-
yield record if block_given?
|
67
|
-
end
|
68
|
-
records
|
58
|
+
def groups(options = {})
|
59
|
+
all('groups', options)
|
69
60
|
end
|
70
61
|
|
71
62
|
def group_user_assignment(users_with_roles, params = { with_members: true })
|
72
63
|
updated = []
|
73
|
-
groups do |group|
|
64
|
+
groups.each do |group|
|
74
65
|
changed = false
|
75
66
|
|
76
67
|
users_with_roles.each do |user, roles|
|
@@ -106,63 +97,30 @@ module ArchivesSpace
|
|
106
97
|
|
107
98
|
def password_reset(username, password)
|
108
99
|
user = all('users').find { |u| u["username"] == username }
|
109
|
-
raise RequestError.new
|
100
|
+
raise RequestError.new(user.status) unless user
|
110
101
|
post(user["uri"], user, { password: password })
|
111
102
|
end
|
112
103
|
|
113
|
-
def repositories
|
114
|
-
|
115
|
-
yield record if block_given?
|
116
|
-
end
|
117
|
-
records
|
104
|
+
def repositories(options = {})
|
105
|
+
all('repositories', options)
|
118
106
|
end
|
119
107
|
|
120
108
|
def repositories_with_agent
|
121
109
|
#
|
122
110
|
end
|
123
111
|
|
124
|
-
def
|
125
|
-
|
126
|
-
path = format == "ead" ? "resource_descriptions/#{id}.xml" : "resources/#{format}/#{id}.xml"
|
127
|
-
get_xml path
|
128
|
-
end
|
129
|
-
|
130
|
-
def resources(format = nil, options = {}, &block)
|
131
|
-
path = 'resources'
|
132
|
-
# the api is inconsistent with the path structure for resource ead (and pdf)
|
133
|
-
if format
|
134
|
-
if format =~ /(ead|pdf)/
|
135
|
-
format = "resource_descriptions"
|
136
|
-
else
|
137
|
-
format = "#{path}/#{format}"
|
138
|
-
end
|
139
|
-
end
|
140
|
-
records = all(path, options.merge({ format: format })) do |record|
|
141
|
-
yield record if block_given?
|
142
|
-
end
|
143
|
-
records
|
112
|
+
def resources(options = {})
|
113
|
+
all('resources', options)
|
144
114
|
end
|
145
115
|
|
146
116
|
def search(params)
|
147
117
|
# get "search", params
|
148
118
|
end
|
149
119
|
|
150
|
-
def users
|
151
|
-
|
152
|
-
yield record if block_given?
|
153
|
-
end
|
154
|
-
records
|
155
|
-
end
|
156
|
-
|
157
|
-
private
|
158
|
-
|
159
|
-
def get_xml(path)
|
160
|
-
# add xml headers
|
161
|
-
response = get(path)
|
162
|
-
raise RequestError.new path unless response.status_code == 200
|
163
|
-
Nokogiri::XML(response.body).to_xml
|
120
|
+
def users(options = {})
|
121
|
+
all('users', options)
|
164
122
|
end
|
165
123
|
|
166
124
|
end
|
167
125
|
|
168
|
-
end
|
126
|
+
end
|
@@ -21,18 +21,19 @@ module ArchivesSpace
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def initialize(config, method = "GET", path = "", options = {})
|
24
|
-
@config
|
25
|
-
@method
|
26
|
-
@path
|
24
|
+
@config = config
|
25
|
+
@method = method.downcase.to_sym
|
26
|
+
@path = path.gsub(/^\/+/, '')
|
27
|
+
@options = options
|
28
|
+
@options[:headers] = options[:headers] ? default_headers(@method).merge(options[:headers]) : default_headers(@method)
|
29
|
+
@options[:verify] = config.verify_ssl
|
30
|
+
@options[:query] = {} unless options.has_key? :query
|
31
|
+
|
32
|
+
base_uri = (
|
33
|
+
config.base_repo.nil? or config.base_repo.empty?
|
34
|
+
) ? config.base_uri : "#{config.base_uri}/#{config.base_repo}"
|
27
35
|
|
28
|
-
@options = options
|
29
|
-
@options[:headers] = options[:headers] ? default_headers(@method).merge(options[:headers]) : default_headers
|
30
|
-
@options[:verify] = config.verify_ssl
|
31
|
-
@options[:query] = {} unless options.has_key? :query
|
32
|
-
|
33
|
-
base_uri = (config.base_repo.nil? or config.base_repo.empty?) ? config.base_uri : "#{config.base_uri}/#{config.base_repo}"
|
34
36
|
self.class.base_uri base_uri
|
35
|
-
# self.class.default_params abc: 123
|
36
37
|
end
|
37
38
|
|
38
39
|
def execute
|
@@ -41,4 +42,4 @@ module ArchivesSpace
|
|
41
42
|
|
42
43
|
end
|
43
44
|
|
44
|
-
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Cooper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,100 +42,100 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.6.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: vcr
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.0.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 3.0.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.0.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.0.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: awesome_print
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.8.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.8.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: httparty
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.14.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.14.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: json
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 2.0.3
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 2.0.3
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: nokogiri
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 1.10.10
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 1.10.10
|
139
139
|
description: Interact with ArchivesSpace via its RESTful API.
|
140
140
|
email:
|
141
141
|
- mark.c.cooper@outlook.com
|
@@ -153,8 +153,8 @@ files:
|
|
153
153
|
- archivesspace-client.gemspec
|
154
154
|
- examples/export.rb
|
155
155
|
- examples/password_reset.rb
|
156
|
-
- examples/perms_and_groups.rb
|
157
156
|
- examples/repo_and_user.rb
|
157
|
+
- examples/test_connection.rb
|
158
158
|
- lib/archivesspace/client.rb
|
159
159
|
- lib/archivesspace/client/client.rb
|
160
160
|
- lib/archivesspace/client/configuration.rb
|
@@ -190,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
|
194
|
-
rubygems_version: 2.2.2
|
193
|
+
rubygems_version: 3.0.3
|
195
194
|
signing_key:
|
196
195
|
specification_version: 4
|
197
196
|
summary: Interact with ArchivesSpace via its RESTful API.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
require 'awesome_print'
|
3
|
-
require 'archivesspace/client'
|
4
|
-
|
5
|
-
# default client connection: localhost:8089, admin, admin
|
6
|
-
client = ArchivesSpace::Client.new.login
|
7
|
-
|
8
|
-
# todo ... example of assignment using CSV
|