archivesspace-client 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26be5a79844d110ef48e58aff9f3e1d77a9c30cbdcdad23939fce33853a21f1c
4
- data.tar.gz: 0b9751a44ecd8e594eaad01395c088b78c438759b7691bcaacc6160262e35325
3
+ metadata.gz: 4aa54400871b3c9e356f6750ba9aa9fbba6111869ad57bcfe548334296fbf146
4
+ data.tar.gz: 8fede8b9a6e86517ebea6fa8f3ed0c5e3cb3b18966137a0d7133453bf5f67d1e
5
5
  SHA512:
6
- metadata.gz: 93475f09b5b24182646d0dce07b57aa2cc1e98a6e78be5874ee20454f9603736f86fe2c0bba360c72641e1364ffec9d28bdbbad12683c7c86d061486148814ad
7
- data.tar.gz: 6671814168066bc5c4ad04c436bed59e50fbec5febd6a11867b7f97f93c1be15d40e2d3147c19283ced5f435702f1107bf2476abe0a966dbffc149e461595911
6
+ metadata.gz: a0f5d93549e1357eb6f6a1470faeeb4b36dfc1f43676ffed68c148298c23f8a4263ac88befebd4d85ba54cdd0a2b9bc69c53eac8a038aa5ce18962c57cf8afaf
7
+ data.tar.gz: 71cc7ac848b1c60744f122156706e88457da232e08184cff9c2b53fa32871f585743de9c1d87b26a96105f8c98d72b7221b5dfca8bcc828a3b50845089901a1b
@@ -13,7 +13,6 @@ jobs:
13
13
  uses: ruby/setup-ruby@v1
14
14
  with:
15
15
  bundler-cache: true
16
- ruby-version: 2.7
17
16
 
18
17
  - name: Lint
19
18
  run: |
@@ -21,4 +20,4 @@ jobs:
21
20
 
22
21
  - name: Run tests
23
22
  run: |
24
- bundle exec rake
23
+ bundle exec rspec
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/README.md CHANGED
@@ -95,11 +95,11 @@ client.use_global_repository
95
95
 
96
96
  Templates are an optional feature that can help simplify the effort of creating
97
97
  json payloads for ArchivesSpace. Rather than construct the json programatically
98
- according to the schemas a `.erb` template can be used to generate payloads
99
- instead which are transformed to json automatically. There are a small number of
98
+ according to the schemas a template can be used to generate payloads instead which
99
+ are transformed to json automatically. There are a small number of
100
100
  templates provided with the client, but you can create your own and access them
101
101
  by setting the `ARCHIVESSPACE_CLIENT_TEMPLATES_PATH` envvar. A particularly simple
102
- template might look like:
102
+ `erb` template might look like:
103
103
 
104
104
  ```erb
105
105
  {
@@ -115,11 +115,13 @@ assembling the payload. To process a template:
115
115
 
116
116
  ```ruby
117
117
  data = { repo_code: 'ABC', name: 'ABC Archive', agent_contact_name: 'ABC Admin' }
118
- json = ArchivesSpace::Template.process(:repository_with_agent, data)
118
+ json = ArchivesSpace::Template.process("repository_with_agent.json.erb", data)
119
119
  response = client.post('/repositories/with_agent', json)
120
120
  puts response.result.success? ? '=)' : '=('
121
121
  ```
122
122
 
123
+ To view available templates use: `ArchivesSpace::Template.list`
124
+
123
125
  ## CLI
124
126
 
125
127
  Create an `~/.asclientrc` file with a json version of the client configuration:
@@ -18,21 +18,17 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "aruba"
22
- spec.add_development_dependency "awesome_print", "~> 1.8.0"
23
- spec.add_development_dependency "bundler"
24
- spec.add_development_dependency "capybara_discoball"
25
- spec.add_development_dependency "cucumber"
26
- spec.add_development_dependency "json_spec"
21
+ spec.add_development_dependency "aruba", "~> 2.0"
27
22
  spec.add_development_dependency "rake", "~> 10.0"
28
23
  spec.add_development_dependency "rspec", "3.6.0"
29
- spec.add_development_dependency "rubocop"
30
- spec.add_development_dependency "standard"
31
- spec.add_development_dependency "vcr", "3.0.3"
32
- spec.add_development_dependency "webmock", "3.0.1"
24
+ spec.add_development_dependency "rubocop", "1.56"
25
+ spec.add_development_dependency "standard", "1.31.0"
26
+ spec.add_development_dependency "vcr", "6.2.0"
27
+ spec.add_development_dependency "webmock", "3.19.1"
33
28
 
34
29
  spec.add_dependency "dry-cli", "~> 0.7"
35
30
  spec.add_dependency "httparty", "~> 0.14"
36
31
  spec.add_dependency "json", "~> 2.0"
37
32
  spec.add_dependency "nokogiri", "~> 1.10"
33
+ spec.add_dependency "jbuilder", "~> 2.11.5"
38
34
  end
@@ -34,7 +34,7 @@ user_data = {
34
34
  }
35
35
  user_password = "123456"
36
36
 
37
- repository = ArchivesSpace::Template.process(:repository_with_agent, repo_data)
37
+ repository = ArchivesSpace::Template.process("repository_with_agent.json.erb", repo_data)
38
38
 
39
39
  begin
40
40
  response = client.post("/repositories/with_agent", repository)
@@ -46,7 +46,7 @@ begin
46
46
  ap response.parsed
47
47
  end
48
48
 
49
- user = ArchivesSpace::Template.process(:user, user_data)
49
+ user = ArchivesSpace::Template.process("user.json.erb", user_data)
50
50
  response = client.post("users", user, {password: user_password})
51
51
  if response.result.success?
52
52
  user = client.users.find { |r| r["username"] == "lmessi" }
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
4
+ require "awesome_print"
5
+ require "archivesspace/client"
6
+
7
+ puts ArchivesSpace::Template.list
8
+
9
+ template = "repository_with_agent.json.erb"
10
+ user_data = {
11
+ username: "harrykane",
12
+ name: "Harry Kane",
13
+ is_admin: false
14
+ }
15
+
16
+ puts ArchivesSpace::Template.process(template, user_data)
17
+ # or, if you really want ...
18
+ puts ArchivesSpace::Template::Erb.new(template, user_data).process
@@ -27,7 +27,7 @@ user_data = {
27
27
 
28
28
  client.post(
29
29
  "users",
30
- ArchivesSpace::Template.process(:user, user_data),
30
+ ArchivesSpace::Template.process("user.json.erb", user_data),
31
31
  {password: "123456"}
32
32
  )
33
33
 
@@ -7,6 +7,8 @@ module ArchivesSpace
7
7
  attr_accessor :token
8
8
  attr_reader :config
9
9
 
10
+ NAME = "ArchivesSpaceClient"
11
+
10
12
  def initialize(config = Configuration.new)
11
13
  raise "Invalid configuration object" unless config.is_a? ArchivesSpace::Configuration
12
14
 
@@ -21,7 +21,7 @@ module ArchivesSpace
21
21
  settings.each do |property, value|
22
22
  next unless defaults.key?(property)
23
23
 
24
- instance_variable_set("@#{property}", value)
24
+ instance_variable_set(:"@#{property}", value)
25
25
  self.class.send(:attr_accessor, property)
26
26
  end
27
27
  end
@@ -28,6 +28,7 @@ module ArchivesSpace
28
28
  @options = options
29
29
  @options[:headers] =
30
30
  options[:headers] ? default_headers(@method).merge(options[:headers]) : default_headers(@method)
31
+ @options[:headers]["User-Agent"] = "#{Client::NAME}/#{Client::VERSION}"
31
32
  @options[:verify] = config.verify_ssl
32
33
  @options[:timeout] = config.timeout
33
34
  @options[:query] = {} unless options.key? :query
@@ -3,17 +3,13 @@
3
3
  module ArchivesSpace
4
4
  module Template
5
5
  def self.list
6
- Dir.glob File.join(templates_path, "*.erb")
6
+ Dir.glob ["*"], base: File.join(templates_path)
7
7
  end
8
8
 
9
9
  def self.process(template, data)
10
- t = ERB.new(read(template))
11
- r = t.result(binding).squeeze("\n")
12
- JSON.parse(r).to_json
13
- end
14
-
15
- def self.read(file)
16
- File.read("#{templates_path}/#{file}.json.erb")
10
+ processor = File.extname(template).delete(".").camelize
11
+ processor = Object.const_get("ArchivesSpace::Template::#{processor}")
12
+ processor.new(template, data).process
17
13
  end
18
14
 
19
15
  def self.templates_path
@@ -22,5 +18,52 @@ module ArchivesSpace
22
18
  File.join(File.dirname(File.expand_path(__FILE__)), "templates")
23
19
  )
24
20
  end
21
+
22
+ class Processor
23
+ attr_reader :template, :data
24
+
25
+ def initialize(template, data)
26
+ @template = template
27
+ @data = data
28
+
29
+ validate_template
30
+ end
31
+
32
+ def extension
33
+ raise "Not implemented"
34
+ end
35
+
36
+ def read_template
37
+ File.read(File.join(ArchivesSpace::Template.templates_path, template))
38
+ end
39
+
40
+ def validate_template
41
+ raise "Invalid template" unless File.extname(template).end_with? extension
42
+ end
43
+ end
44
+
45
+ class Erb < Processor
46
+ def extension
47
+ ".erb"
48
+ end
49
+
50
+ def process
51
+ t = ERB.new(read_template)
52
+ r = t.result(binding).squeeze("\n")
53
+ JSON.parse(r).to_json
54
+ end
55
+ end
56
+
57
+ class Jbuilder < Processor
58
+ def extension
59
+ ".jbuilder"
60
+ end
61
+
62
+ def process
63
+ ::Jbuilder.encode do |json|
64
+ eval(read_template, binding) # standard:disable Security/Eval
65
+ end
66
+ end
67
+ end
25
68
  end
26
69
  end
@@ -0,0 +1,7 @@
1
+ json.id_0 data["object_number"]
2
+ json.title data["title"]
3
+ json.level data["description_level"]
4
+
5
+ # json.id_0 "001.001"
6
+ # json.title "Title"
7
+ # json.level "collection"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ArchivesSpace
4
4
  class Client
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -4,6 +4,7 @@ require "dry/cli"
4
4
  require "httparty"
5
5
  require "json"
6
6
  require "nokogiri"
7
+ require "jbuilder"
7
8
 
8
9
  # mixins required first
9
10
  require "archivesspace/client/pagination"
@@ -4,11 +4,9 @@ require "spec_helper"
4
4
 
5
5
  describe ArchivesSpace::Client do
6
6
  let(:client) { ArchivesSpace::Client.new }
7
- let(:login) { -> { client.login } }
8
7
 
9
8
  describe "Configuration" do
10
9
  it "will use the default configuration if none is provided" do
11
- client = ArchivesSpace::Client.new
12
10
  expect(client.config.base_uri).to eq DEFAULT_BASE_URI
13
11
  end
14
12
 
@@ -24,42 +22,43 @@ describe ArchivesSpace::Client do
24
22
 
25
23
  describe "Repository scoping" do
26
24
  it "will set the repository with an integer id" do
27
- client = ArchivesSpace::Client.new
28
25
  client.repository 2
29
26
  expect(client.config.base_repo).to eq "repositories/2"
30
27
  end
31
28
 
32
29
  it "will set the repository with a string id cast to integer" do
33
- client = ArchivesSpace::Client.new
34
30
  client.repository "2"
35
31
  expect(client.config.base_repo).to eq "repositories/2"
36
32
  end
37
33
 
38
34
  it "will fail if the id cannot be cast to integer" do
39
- client = ArchivesSpace::Client.new
40
35
  expect { client.repository("xyz") }.to raise_error(
41
36
  ArchivesSpace::RepositoryIdError
42
37
  )
43
38
  end
44
39
 
45
40
  it "will use the global repo if repository is passed nil" do
46
- client = ArchivesSpace::Client.new
47
41
  client.repository 2
48
42
  client.repository nil
49
43
  expect(client.config.base_repo).to eq ""
50
44
  end
51
45
 
52
46
  it "will use the global repo when the method is called" do
53
- client = ArchivesSpace::Client.new
54
47
  client.repository 2
55
48
  client.use_global_repository
56
49
  expect(client.config.base_repo).to eq ""
57
50
  end
58
51
  end
59
52
 
53
+ describe "Requests" do
54
+ it "will have an identifiable user agent" do
55
+ request = ArchivesSpace::Request.new(client.config)
56
+ expect(request.options[:headers]["User-Agent"]).to eq "#{ArchivesSpace::Client::NAME}/#{ArchivesSpace::Client::VERSION}"
57
+ end
58
+ end
59
+
60
60
  describe "Pagination" do
61
61
  it "will have a method for defined paginated record types" do
62
- client = ArchivesSpace::Client.new
63
62
  ArchivesSpace::Pagination::ENDPOINTS.each do |e|
64
63
  next if e.match?("/")
65
64
 
@@ -68,7 +67,6 @@ describe ArchivesSpace::Client do
68
67
  end
69
68
 
70
69
  it "will have a method for defined paginated record types with multipart path" do
71
- client = ArchivesSpace::Client.new
72
70
  expect(client.respond_to?(:people)).to be true
73
71
  end
74
72
  end
@@ -80,7 +78,7 @@ describe ArchivesSpace::Client do
80
78
 
81
79
  it "can retrieve the backend version info" do
82
80
  VCR.use_cassette("backend_version") do
83
- login.call
81
+ client.login
84
82
  response = client.get "version"
85
83
  expect(response.status_code).to eq(200)
86
84
  expect(response.body).to match(/ArchivesSpace \(.*\)/)
@@ -7,20 +7,34 @@ describe ArchivesSpace::Template do
7
7
  templates = ArchivesSpace::Template.list
8
8
  expect(templates).to_not be_empty
9
9
  expect(templates).to include(/repository_with_agent.*erb/)
10
+ expect(templates).to include(/resource.*jbuilder/)
10
11
  end
11
12
 
12
13
  it "can change the path when template envvar is set" do
13
14
  expect(ArchivesSpace::Template.templates_path).to match(
14
- /#{File.join('lib', 'archivesspace', 'client', 'templates')}/
15
+ /#{File.join("lib", "archivesspace", "client", "templates")}/
15
16
  )
16
17
  ENV["ARCHIVESSPACE_CLIENT_TEMPLATES_PATH"] = "/path/to/nowhere"
17
18
  expect(ArchivesSpace::Template.templates_path).to eq "/path/to/nowhere"
18
19
  ENV.delete("ARCHIVESSPACE_CLIENT_TEMPLATES_PATH")
19
20
  end
20
21
 
21
- it "can process a template" do
22
+ it "can process an erb template" do
22
23
  data = {repo_code: "ABC", name: "ABC Archive", agent_contact_name: "ABC Admin"}
23
- json = JSON.parse(ArchivesSpace::Template.process(:repository_with_agent, data))
24
+ json = JSON.parse(ArchivesSpace::Template.process("repository_with_agent.json.erb", data))
24
25
  expect(json["repository"]["repo_code"]).to eq data[:repo_code]
25
26
  end
27
+
28
+ it "can process a jbuilder template" do
29
+ data = {"title" => "Title", "object_number" => "001.001", "description_level" => "collection"}
30
+ json = JSON.parse(ArchivesSpace::Template.process("resource.json.jbuilder", data))
31
+ expect(json["id_0"]).to eq data["object_number"]
32
+ end
33
+
34
+ it "rejects a template that does not match by extension" do
35
+ data = {"title" => "Title"}
36
+ expect {
37
+ JSON.parse(ArchivesSpace::Template::Erb.new("resource.json.jbuilder", data).process)
38
+ }.to raise_error "Invalid template"
39
+ end
26
40
  end
@@ -6,30 +6,38 @@ http_interactions:
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
9
- headers: {}
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Content-Length:
13
+ - nnnn
14
+ User-Agent:
15
+ - ArchivesSpaceClient/0.3.0
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
10
20
  response:
11
21
  status:
12
22
  code: 200
13
23
  message: OK
14
24
  headers:
15
- Date:
16
- - Sat, 26 Dec 2015 05:05:14 GMT
17
- Content-Type:
18
- - application/json
19
25
  Cache-Control:
20
26
  - private, must-revalidate, max-age=0
21
- Content-Length:
22
- - '2491'
27
+ Content-Type:
28
+ - application/json
23
29
  X-Content-Type-Options:
24
30
  - nosniff
31
+ Content-Length:
32
+ - '3087'
25
33
  Server:
26
- - Jetty(8.1.5.v20120716)
34
+ - Jetty(9.4.44.v20210927)
27
35
  body:
28
36
  encoding: UTF-8
29
- string: |
30
- {"session":"a1b9e7cac8fb01d2502678702c1eaa71b1fa6375a1de8b1f965095e71f4fd6f8","user":{"lock_version":84,"username":"admin","name":"Administrator","is_system_user":true,"create_time":"2015-12-24T05:51:42Z","system_mtime":"2015-12-26T05:05:14Z","user_mtime":"2015-12-26T05:05:14Z","jsonmodel_type":"user","groups":[],"is_admin":true,"uri":"/users/1","agent_record":{"ref":"/agents/people/1"},"permissions":{"/repositories/1":["update_location_record","delete_vocabulary_record","update_subject_record","delete_subject_record","update_agent_record","delete_agent_record","update_vocabulary_record","merge_subject_record","merge_agent_record","update_container_profile_record","administer_system","become_user","cancel_importer_job","create_repository","delete_archival_record","delete_classification_record","delete_event_record","delete_repository","import_records","index_system","manage_agent_record","manage_container_profile_record","manage_container_record","manage_rde_templates","manage_repository","manage_subject_record","manage_users","manage_vocabulary_record","mediate_edits","merge_agents_and_subjects","merge_archival_record","suppress_archival_record","system_config","transfer_archival_record","transfer_repository","update_accession_record","update_classification_record","update_container_record","update_digital_object_record","update_event_record","update_resource_record","view_all_records","view_repository","view_suppressed"],"_archivesspace":["administer_system","become_user","cancel_importer_job","create_repository","delete_archival_record","delete_classification_record","delete_event_record","delete_repository","import_records","index_system","manage_agent_record","manage_container_profile_record","manage_container_record","manage_rde_templates","manage_repository","manage_subject_record","manage_users","manage_vocabulary_record","mediate_edits","merge_agents_and_subjects","merge_archival_record","suppress_archival_record","system_config","transfer_archival_record","transfer_repository","update_accession_record","update_classification_record","update_container_record","update_digital_object_record","update_event_record","update_resource_record","view_all_records","view_repository","view_suppressed","update_location_record","delete_vocabulary_record","update_subject_record","delete_subject_record","update_agent_record","delete_agent_record","update_vocabulary_record","merge_subject_record","merge_agent_record","update_container_profile_record"]}}}
31
- http_version:
32
- recorded_at: Sat, 26 Dec 2015 05:05:14 GMT
37
+ string: '{"session":"24622209ad0b8c8b7223f13ec1bdad594856eaab6461264cbf7f177fd18bcde1","user":{"lock_version":19,"username":"admin","name":"Administrator","source":"DBAuth","is_system_user":true,"create_time":"2016-10-05T06:24:16Z","system_mtime":"2023-12-29T18:41:21Z","user_mtime":"2023-12-29T18:41:21Z","is_active_user":true,"jsonmodel_type":"user","groups":[],"is_admin":true,"uri":"/users/1","agent_record":{"ref":"/agents/people/1"},"permissions":{"/repositories/1":["update_location_record","delete_vocabulary_record","update_subject_record","delete_subject_record","update_agent_record","delete_agent_record","update_vocabulary_record","merge_subject_record","merge_agent_record","update_container_profile_record","update_location_profile_record","update_enumeration_record","administer_system","manage_users","become_user","view_all_records","create_repository","delete_repository","transfer_repository","index_system","manage_repository","update_accession_record","update_resource_record","update_digital_object_record","update_event_record","delete_event_record","suppress_archival_record","transfer_archival_record","delete_archival_record","view_suppressed","view_repository","update_classification_record","delete_classification_record","mediate_edits","import_records","cancel_importer_job","manage_subject_record","manage_agent_record","manage_vocabulary_record","merge_agents_and_subjects","merge_archival_record","manage_rde_templates","update_container_record","manage_container_record","manage_container_profile_record","manage_location_profile_record","update_assessment_record","delete_assessment_record","manage_assessment_attributes","create_job","cancel_job","view_agent_contact_record","manage_enumeration_record","manage_custom_report_templates"],"_archivesspace":["administer_system","manage_users","become_user","view_all_records","create_repository","delete_repository","transfer_repository","index_system","manage_repository","update_accession_record","update_resource_record","update_digital_object_record","update_event_record","delete_event_record","suppress_archival_record","transfer_archival_record","delete_archival_record","view_suppressed","view_repository","update_classification_record","delete_classification_record","mediate_edits","import_records","cancel_importer_job","manage_subject_record","manage_agent_record","manage_vocabulary_record","merge_agents_and_subjects","merge_archival_record","manage_rde_templates","update_container_record","manage_container_record","manage_container_profile_record","manage_location_profile_record","update_assessment_record","delete_assessment_record","manage_assessment_attributes","create_job","cancel_job","view_agent_contact_record","manage_enumeration_record","manage_custom_report_templates","update_location_record","delete_vocabulary_record","update_subject_record","delete_subject_record","update_agent_record","delete_agent_record","update_vocabulary_record","merge_subject_record","merge_agent_record","update_container_profile_record","update_location_profile_record","update_enumeration_record"]}}}
38
+
39
+ '
40
+ recorded_at: Fri, 29 Dec 2023 18:41:25 GMT
33
41
  - request:
34
42
  method: get
35
43
  uri: http://localhost:8089/version
@@ -38,31 +46,34 @@ http_interactions:
38
46
  string: ''
39
47
  headers:
40
48
  X-Archivesspace-Session:
41
- - a1b9e7cac8fb01d2502678702c1eaa71b1fa6375a1de8b1f965095e71f4fd6f8
49
+ - 24622209ad0b8c8b7223f13ec1bdad594856eaab6461264cbf7f177fd18bcde1
50
+ User-Agent:
51
+ - ArchivesSpaceClient/0.3.0
52
+ Accept-Encoding:
53
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
54
+ Accept:
55
+ - "*/*"
42
56
  response:
43
57
  status:
44
58
  code: 200
45
59
  message: OK
46
60
  headers:
47
- Date:
48
- - Sat, 26 Dec 2015 05:05:14 GMT
49
- Content-Type:
50
- - text/html;charset=UTF-8
51
61
  Cache-Control:
52
62
  - private, must-revalidate, max-age=0
53
- Content-Length:
54
- - '29'
63
+ Content-Type:
64
+ - text/html;charset=utf-8
55
65
  X-Xss-Protection:
56
66
  - 1; mode=block
57
67
  X-Content-Type-Options:
58
68
  - nosniff
59
69
  X-Frame-Options:
60
70
  - SAMEORIGIN
71
+ Content-Length:
72
+ - '22'
61
73
  Server:
62
- - Jetty(8.1.5.v20120716)
74
+ - Jetty(9.4.44.v20210927)
63
75
  body:
64
76
  encoding: UTF-8
65
- string: ArchivesSpace (20151120-0315)
66
- http_version:
67
- recorded_at: Sat, 26 Dec 2015 05:05:14 GMT
68
- recorded_with: VCR 3.0.1
77
+ string: ArchivesSpace (v3.4.1)
78
+ recorded_at: Fri, 29 Dec 2023 18:41:25 GMT
79
+ recorded_with: VCR 6.2.0
metadata CHANGED
@@ -1,99 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archivesspace-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Cooper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-25 00:00:00.000000000 Z
11
+ date: 2023-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: awesome_print
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 1.8.0
19
+ version: '2.0'
34
20
  type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 1.8.0
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: capybara_discoball
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: cucumber
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: json_spec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
26
+ version: '2.0'
97
27
  - !ruby/object:Gem::Dependency
98
28
  name: rake
99
29
  requirement: !ruby/object:Gem::Requirement
@@ -126,58 +56,58 @@ dependencies:
126
56
  name: rubocop
127
57
  requirement: !ruby/object:Gem::Requirement
128
58
  requirements:
129
- - - ">="
59
+ - - '='
130
60
  - !ruby/object:Gem::Version
131
- version: '0'
61
+ version: '1.56'
132
62
  type: :development
133
63
  prerelease: false
134
64
  version_requirements: !ruby/object:Gem::Requirement
135
65
  requirements:
136
- - - ">="
66
+ - - '='
137
67
  - !ruby/object:Gem::Version
138
- version: '0'
68
+ version: '1.56'
139
69
  - !ruby/object:Gem::Dependency
140
70
  name: standard
141
71
  requirement: !ruby/object:Gem::Requirement
142
72
  requirements:
143
- - - ">="
73
+ - - '='
144
74
  - !ruby/object:Gem::Version
145
- version: '0'
75
+ version: 1.31.0
146
76
  type: :development
147
77
  prerelease: false
148
78
  version_requirements: !ruby/object:Gem::Requirement
149
79
  requirements:
150
- - - ">="
80
+ - - '='
151
81
  - !ruby/object:Gem::Version
152
- version: '0'
82
+ version: 1.31.0
153
83
  - !ruby/object:Gem::Dependency
154
84
  name: vcr
155
85
  requirement: !ruby/object:Gem::Requirement
156
86
  requirements:
157
87
  - - '='
158
88
  - !ruby/object:Gem::Version
159
- version: 3.0.3
89
+ version: 6.2.0
160
90
  type: :development
161
91
  prerelease: false
162
92
  version_requirements: !ruby/object:Gem::Requirement
163
93
  requirements:
164
94
  - - '='
165
95
  - !ruby/object:Gem::Version
166
- version: 3.0.3
96
+ version: 6.2.0
167
97
  - !ruby/object:Gem::Dependency
168
98
  name: webmock
169
99
  requirement: !ruby/object:Gem::Requirement
170
100
  requirements:
171
101
  - - '='
172
102
  - !ruby/object:Gem::Version
173
- version: 3.0.1
103
+ version: 3.19.1
174
104
  type: :development
175
105
  prerelease: false
176
106
  version_requirements: !ruby/object:Gem::Requirement
177
107
  requirements:
178
108
  - - '='
179
109
  - !ruby/object:Gem::Version
180
- version: 3.0.1
110
+ version: 3.19.1
181
111
  - !ruby/object:Gem::Dependency
182
112
  name: dry-cli
183
113
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +164,20 @@ dependencies:
234
164
  - - "~>"
235
165
  - !ruby/object:Gem::Version
236
166
  version: '1.10'
167
+ - !ruby/object:Gem::Dependency
168
+ name: jbuilder
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 2.11.5
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 2.11.5
237
181
  description: Interact with ArchivesSpace via the API.
238
182
  email:
239
183
  - mark.c.cooper@outlook.com
@@ -246,6 +190,7 @@ files:
246
190
  - ".gitignore"
247
191
  - ".rspec"
248
192
  - ".rubocop.yml"
193
+ - ".ruby-version"
249
194
  - ".travis.yml"
250
195
  - Gemfile
251
196
  - LICENSE.txt
@@ -255,6 +200,7 @@ files:
255
200
  - examples/export.rb
256
201
  - examples/password_reset.rb
257
202
  - examples/repo_and_user.rb
203
+ - examples/templates.rb
258
204
  - examples/test_connection.rb
259
205
  - examples/user_groups.rb
260
206
  - exe/asclient
@@ -275,6 +221,7 @@ files:
275
221
  - lib/archivesspace/client/templates/digital_object.json.erb
276
222
  - lib/archivesspace/client/templates/repository.json.erb
277
223
  - lib/archivesspace/client/templates/repository_with_agent.json.erb
224
+ - lib/archivesspace/client/templates/resource.json.jbuilder
278
225
  - lib/archivesspace/client/templates/user.json.erb
279
226
  - lib/archivesspace/client/version.rb
280
227
  - spec/archivesspace/client_spec.rb
@@ -301,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
248
  - !ruby/object:Gem::Version
302
249
  version: '0'
303
250
  requirements: []
304
- rubygems_version: 3.3.21
251
+ rubygems_version: 3.4.22
305
252
  signing_key:
306
253
  specification_version: 4
307
254
  summary: Interact with ArchivesSpace via the API.