preservation-client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +2 -0
- data/.rubocop.yml +25 -0
- data/.rubocop_todo.yml +24 -0
- data/.travis.yml +26 -0
- data/Gemfile +8 -0
- data/LICENSE +14 -0
- data/README.md +65 -0
- data/Rakefile +11 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/preservation/client/error_faraday_middleware.rb +15 -0
- data/lib/preservation/client/objects.rb +16 -0
- data/lib/preservation/client/response_error_formatter.rb +35 -0
- data/lib/preservation/client/version.rb +7 -0
- data/lib/preservation/client/versioned_service.rb +36 -0
- data/lib/preservation/client.rb +84 -0
- data/preservation-client.gemspec +42 -0
- metadata +210 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 95721382a355768cd08ee0280fd57dc9d7e7db65190202babb259c4dce2fe48d
|
4
|
+
data.tar.gz: 198bd4efcd107026bbb864eb6ba5dc3ff058573139628bb90d864d97234700d7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cdacd347e69f8b5df8ffdebe692a7557e69de103ae2aeed8a9b1de80753f0665bd85123a7d6badaefad975852185223a444685b075f29cb4d07c38feb008f1fe
|
7
|
+
data.tar.gz: ca8eb24ba43070a39e4b5ab625e31f48c07b7078123d5d6b5edf6cd0e908128230ac132ba8b20ccf0bf98b9968fb43cb219aea041a777a9e5fb724d1c13198b5
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.6
|
5
|
+
|
6
|
+
Layout/EmptyLinesAroundClassBody:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Metrics/BlockLength:
|
10
|
+
Exclude:
|
11
|
+
- 'spec/**/*'
|
12
|
+
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 120
|
15
|
+
Exclude:
|
16
|
+
- 'lib/preservation/client/response_error_formatter.rb'
|
17
|
+
- 'spec/**/*'
|
18
|
+
|
19
|
+
Metrics/MethodLength:
|
20
|
+
Max: 15
|
21
|
+
|
22
|
+
Style/Documentation:
|
23
|
+
Exclude:
|
24
|
+
- 'spec/**/*'
|
25
|
+
- 'lib/preservation/client.rb'
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-09-19 17:54:24 -0700 using RuboCop version 0.74.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
Metrics/AbcSize:
|
11
|
+
Max: 24
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
+
# ExcludedMethods: refine
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Max: 26
|
18
|
+
|
19
|
+
# Offense count: 1
|
20
|
+
# Cop supports --auto-correct.
|
21
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
22
|
+
# URISchemes: http, https
|
23
|
+
Metrics/LineLength:
|
24
|
+
Max: 137
|
data/.travis.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
env:
|
2
|
+
global:
|
3
|
+
- CC_TEST_REPORTER_ID=02e8afad8d0b699828dd69b6f45b598e7317b2d9828ea23380c3a97113068a0c
|
4
|
+
|
5
|
+
dist: bionic
|
6
|
+
language: ruby
|
7
|
+
cache: bundler
|
8
|
+
rvm:
|
9
|
+
- 2.5.3
|
10
|
+
- 2.6.4
|
11
|
+
|
12
|
+
env:
|
13
|
+
- "RAILS_VERSION=5.2.3"
|
14
|
+
- "RAILS_VERSION=6.0.0"
|
15
|
+
|
16
|
+
before_install: gem install bundler -v 2.0.2
|
17
|
+
|
18
|
+
before_script:
|
19
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
20
|
+
- chmod +x ./cc-test-reporter
|
21
|
+
- ./cc-test-reporter before-build
|
22
|
+
after_script:
|
23
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
24
|
+
|
25
|
+
notifications:
|
26
|
+
email: false
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Copyright (c) 2019 by The Board of Trustees of the Leland Stanford
|
2
|
+
Junior University. All rights reserved.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
|
+
may not use this file except in compliance with the License. You
|
6
|
+
may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
13
|
+
implied. See the License for the specific language governing
|
14
|
+
permissions and limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/preservaton-client.svg)](https://badge.fury.io/rb/preservation-client)
|
2
|
+
[![Build Status](https://travis-ci.org/sul-dlss/preservation-client.svg?branch=master)](https://travis-ci.org/sul-dlss/preservation-client)
|
3
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/00d2d8957226777105b3/maintainability)](https://codeclimate.com/github/sul-dlss/preservation-client/maintainability)
|
4
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/00d2d8957226777105b3/test_coverage)](https://codeclimate.com/github/sul-dlss/preservation-client/test_coverage)
|
5
|
+
|
6
|
+
# Preservation::Client
|
7
|
+
|
8
|
+
Preservation::Client is a Ruby gem that acts as a client to the RESTful HTTP APIs provided by [preservation_catalog](https://github.com/sul-dlss/preservation_catalog).
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'preservation-client'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install preservation-client
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
To configure and use the client, here's an example:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'preservation/client'
|
32
|
+
|
33
|
+
def do_the_thing
|
34
|
+
# This API endpoint returns an integer
|
35
|
+
current_version_as_integer = client.current_version(params: { druid: 'druid:123' })
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def client
|
41
|
+
@client ||= Preservation::Client.configure(url: Settings.preservation_catalog.url)
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
Note that the client may **not** be used without first having been configured, and the `url` keyword is **required**.
|
46
|
+
|
47
|
+
Note that the preservation service is behind a firewall.
|
48
|
+
|
49
|
+
## API Coverage
|
50
|
+
|
51
|
+
TBD
|
52
|
+
|
53
|
+
## Development
|
54
|
+
|
55
|
+
After checking out the repo, run `bundle` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
56
|
+
|
57
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `lib/preservation/client/version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
58
|
+
|
59
|
+
## Contributing
|
60
|
+
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sul-dlss/preservation-client
|
62
|
+
|
63
|
+
## Copyright
|
64
|
+
|
65
|
+
Copyright (c) 2019 Stanford Libraries. See LICENSE for details.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'preservation/client'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
require 'pry'
|
12
|
+
Pry.start
|
13
|
+
|
14
|
+
# require 'irb'
|
15
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Preservation
|
4
|
+
class Client
|
5
|
+
# This wraps any faraday connection errors with preservation-client errors
|
6
|
+
# see https://www.rubydoc.info/gems/faraday/Faraday/ClientError for info on errors
|
7
|
+
class ErrorFaradayMiddleware < Faraday::Response::Middleware
|
8
|
+
def call(env)
|
9
|
+
@app.call(env)
|
10
|
+
rescue Faraday::ConnectionFailed, Faraday::SSLError, Faraday::TimeoutError => e
|
11
|
+
raise ConnectionFailedError, "Unable to reach Preservation Catalog - failed with #{e.class}: #{e.message}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Preservation
|
4
|
+
class Client
|
5
|
+
# API calls that are about Preserved Objects
|
6
|
+
class Objects < VersionedService
|
7
|
+
|
8
|
+
# @param [String] druid - with or without prefix: 'druid:ab123cd4567' OR 'ab123cd4567'
|
9
|
+
# @return [Integer] the current version of the Preserved Object
|
10
|
+
def current_version(druid)
|
11
|
+
resp_body = get_json("objects/#{druid}.json", druid, 'current_version')
|
12
|
+
resp_body[:current_version]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Preservation
|
4
|
+
class Client
|
5
|
+
# Format HTTP response-related errors
|
6
|
+
class ResponseErrorFormatter
|
7
|
+
DEFAULT_BODY = 'Response from preservation-catalog did not contain a body. '\
|
8
|
+
'Check honeybadger for preservation-catalog for backtraces, '\
|
9
|
+
'and look into adding a `rescue_from` in preservation-catalog '\
|
10
|
+
'to provide more details to the client in the future.'
|
11
|
+
|
12
|
+
def self.format(response:, object_id: nil, client_method_name: nil)
|
13
|
+
new(response: response, object_id: object_id, client_method_name: client_method_name).format
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_reader :req_url, :status_msg, :status_code, :body, :object_id, :client_method_name
|
17
|
+
|
18
|
+
def initialize(response:, object_id: nil, client_method_name: nil)
|
19
|
+
@req_url = response.env.url
|
20
|
+
@status_msg = response.reason_phrase
|
21
|
+
@status_code = response.status
|
22
|
+
@body = response.body.present? ? response.body : DEFAULT_BODY
|
23
|
+
@object_id = object_id
|
24
|
+
@client_method_name = client_method_name
|
25
|
+
end
|
26
|
+
|
27
|
+
def format
|
28
|
+
status_info = status_msg.blank? ? status_code : "#{status_msg} (#{status_code})"
|
29
|
+
object_id_info = " for #{object_id}" if object_id.present?
|
30
|
+
|
31
|
+
"Preservation::Client.#{client_method_name}#{object_id_info} got #{status_info} from Preservation Catalog at #{req_url}: #{body}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Preservation
|
4
|
+
class Client
|
5
|
+
# @abstract API calls to a versioned endpoint
|
6
|
+
class VersionedService
|
7
|
+
def initialize(connection:, api_version:)
|
8
|
+
@connection = connection
|
9
|
+
@api_version = api_version
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
attr_reader :connection, :api_version
|
15
|
+
|
16
|
+
def get_json(path, object_id, caller_method_name)
|
17
|
+
resp = connection.get do |req|
|
18
|
+
req.url api_version.present? ? "#{api_version}/#{path}" : path
|
19
|
+
req.headers['Content-Type'] = 'application/json'
|
20
|
+
req.headers['Accept'] = 'application/json'
|
21
|
+
end
|
22
|
+
return resp.body if resp.success?
|
23
|
+
|
24
|
+
errmsg = ResponseErrorFormatter
|
25
|
+
.format(response: resp, object_id: object_id, client_method_name: caller_method_name)
|
26
|
+
raise Preservation::Client::UnexpectedResponseError, errmsg
|
27
|
+
rescue Faraday::ResourceNotFound => e
|
28
|
+
errmsg = "HTTP GET to #{connection.url_prefix}#{path} failed with #{e.class}: #{e.message}"
|
29
|
+
raise Preservation::Client::NotFoundError, errmsg
|
30
|
+
rescue Faraday::ParsingError, Faraday::RetriableResponse => e
|
31
|
+
errmsg = "HTTP GET to #{connection.url_prefix}#{path} failed with #{e.class}: #{e.message}"
|
32
|
+
raise Preservation::Client::UnexpectedResponseError, errmsg
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
4
|
+
require 'active_support/core_ext/module/delegation'
|
5
|
+
require 'active_support/core_ext/object/blank'
|
6
|
+
require 'faraday'
|
7
|
+
require 'singleton'
|
8
|
+
require 'zeitwerk'
|
9
|
+
|
10
|
+
class PreservationClientInflector < Zeitwerk::Inflector
|
11
|
+
def camelize(basename, _abspath)
|
12
|
+
case basename
|
13
|
+
when 'version'
|
14
|
+
'VERSION'
|
15
|
+
else
|
16
|
+
super
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
loader = Zeitwerk::Loader.new
|
22
|
+
loader.inflector = PreservationClientInflector.new
|
23
|
+
loader.push_dir(File.absolute_path("#{__FILE__}/../.."))
|
24
|
+
loader.setup
|
25
|
+
|
26
|
+
module Preservation
|
27
|
+
class Client
|
28
|
+
class Error < StandardError; end
|
29
|
+
|
30
|
+
# Error that is raised when the remote server returns a 404 Not Found
|
31
|
+
class NotFoundError < Error; end
|
32
|
+
|
33
|
+
# Error that is raised when the remote server returns some unexpected response
|
34
|
+
# e.g. 4xx or 5xx status
|
35
|
+
class UnexpectedResponseError < Error; end
|
36
|
+
|
37
|
+
class ConnectionFailedError < Error; end
|
38
|
+
|
39
|
+
DEFAULT_API_VERSION = '' # should be v1 once PreservationCatalog has versioned API
|
40
|
+
|
41
|
+
include Singleton
|
42
|
+
|
43
|
+
# @return [Preservation::Client::Objects] an instance of the `Client::Objects` class
|
44
|
+
def objects
|
45
|
+
@objects ||= Objects.new(connection: connection, api_version: DEFAULT_API_VERSION)
|
46
|
+
end
|
47
|
+
|
48
|
+
class << self
|
49
|
+
# @param [String] url
|
50
|
+
def configure(url:)
|
51
|
+
instance.url = url
|
52
|
+
|
53
|
+
# Force connection to be re-established when `.configure` is called
|
54
|
+
instance.connection = nil
|
55
|
+
|
56
|
+
self
|
57
|
+
end
|
58
|
+
|
59
|
+
delegate :objects, to: :instance
|
60
|
+
end
|
61
|
+
|
62
|
+
attr_writer :url, :connection
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def url
|
67
|
+
@url || raise(Error, 'url has not yet been configured')
|
68
|
+
end
|
69
|
+
|
70
|
+
def connection
|
71
|
+
@connection ||= Faraday.new(url) do |builder|
|
72
|
+
builder.use ErrorFaradayMiddleware
|
73
|
+
builder.use Faraday::Request::UrlEncoded
|
74
|
+
|
75
|
+
builder.adapter Faraday.default_adapter
|
76
|
+
builder.headers[:user_agent] = user_agent
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def user_agent
|
81
|
+
"preservation-client #{Preservation::Client::VERSION}"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'preservation/client/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'preservation-client'
|
9
|
+
spec.version = Preservation::Client::VERSION
|
10
|
+
spec.authors = ['Naomi Dushay']
|
11
|
+
spec.email = ['ndushay@stanford.edu']
|
12
|
+
|
13
|
+
spec.summary = 'A thin client for getting info from SDR preservation.'
|
14
|
+
spec.description = 'A Ruby client for the RESTful HTTP APIs provided by the Preservation Catalog API.'
|
15
|
+
spec.homepage = 'https://github.com/sul-dlss/preservation-client'
|
16
|
+
|
17
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org/'
|
18
|
+
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/sul-dlss/preservation-client.'
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = 'exe'
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ['lib']
|
30
|
+
|
31
|
+
spec.add_dependency 'activesupport', '>= 4.2', '< 7'
|
32
|
+
spec.add_dependency 'faraday', '~> 0.15'
|
33
|
+
spec.add_dependency 'zeitwerk', '~> 2.1'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
36
|
+
spec.add_development_dependency 'pry-byebug'
|
37
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
39
|
+
spec.add_development_dependency 'rubocop', '~> 0.74.0'
|
40
|
+
spec.add_development_dependency 'simplecov'
|
41
|
+
spec.add_development_dependency 'webmock'
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: preservation-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Naomi Dushay
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-09-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: faraday
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.15'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.15'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: zeitwerk
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.1'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.1'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: bundler
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: pry-byebug
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rake
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '10.0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '10.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 0.74.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 0.74.0
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: simplecov
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: webmock
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
description: A Ruby client for the RESTful HTTP APIs provided by the Preservation
|
160
|
+
Catalog API.
|
161
|
+
email:
|
162
|
+
- ndushay@stanford.edu
|
163
|
+
executables: []
|
164
|
+
extensions: []
|
165
|
+
extra_rdoc_files: []
|
166
|
+
files:
|
167
|
+
- ".gitignore"
|
168
|
+
- ".rspec"
|
169
|
+
- ".rubocop.yml"
|
170
|
+
- ".rubocop_todo.yml"
|
171
|
+
- ".travis.yml"
|
172
|
+
- Gemfile
|
173
|
+
- LICENSE
|
174
|
+
- README.md
|
175
|
+
- Rakefile
|
176
|
+
- bin/console
|
177
|
+
- bin/setup
|
178
|
+
- lib/preservation/client.rb
|
179
|
+
- lib/preservation/client/error_faraday_middleware.rb
|
180
|
+
- lib/preservation/client/objects.rb
|
181
|
+
- lib/preservation/client/response_error_formatter.rb
|
182
|
+
- lib/preservation/client/version.rb
|
183
|
+
- lib/preservation/client/versioned_service.rb
|
184
|
+
- preservation-client.gemspec
|
185
|
+
homepage: https://github.com/sul-dlss/preservation-client
|
186
|
+
licenses: []
|
187
|
+
metadata:
|
188
|
+
allowed_push_host: https://rubygems.org/
|
189
|
+
homepage_uri: https://github.com/sul-dlss/preservation-client
|
190
|
+
source_code_uri: https://github.com/sul-dlss/preservation-client.
|
191
|
+
post_install_message:
|
192
|
+
rdoc_options: []
|
193
|
+
require_paths:
|
194
|
+
- lib
|
195
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0'
|
200
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
requirements: []
|
206
|
+
rubygems_version: 3.0.3
|
207
|
+
signing_key:
|
208
|
+
specification_version: 4
|
209
|
+
summary: A thin client for getting info from SDR preservation.
|
210
|
+
test_files: []
|