preservation-client 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/lib/preservation/client/version.rb +1 -1
- data/lib/preservation/client/versioned_api_service.rb +3 -1
- data/lib/preservation/client.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3d54508719f54afb0229364f2e9deee3a765d14359b5b27bf3424470193d68c
|
4
|
+
data.tar.gz: 48642fbe62b2f68bf896ada3629a8e9e662e6e4e65a988fbcd49c0188f5f7487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a10daad6e088616be9af53476d244c7fc7fc3a027db67f0197c0f19248962108f035ac70fda19386e9ac75babd234ea874741b4d90604346a44e6b49106e57b
|
7
|
+
data.tar.gz: 6991d66c54291b48ad76e5ac37b14200d965b4ec3e0bb5903bd2f9250619e6fd9ca2c53d6d579009e1db2a548a05649982d42d45b2cb86877ddb295290fa61c7
|
data/.rubocop.yml
CHANGED
@@ -2,9 +2,11 @@
|
|
2
2
|
|
3
3
|
module Preservation
|
4
4
|
class Client
|
5
|
+
DEFAULT_API_VERSION = 'v1'
|
6
|
+
|
5
7
|
# @abstract API calls to a versioned endpoint
|
6
8
|
class VersionedApiService
|
7
|
-
def initialize(connection:, api_version:)
|
9
|
+
def initialize(connection:, api_version: DEFAULT_API_VERSION)
|
8
10
|
@connection = connection
|
9
11
|
@api_version = api_version
|
10
12
|
end
|
data/lib/preservation/client.rb
CHANGED
@@ -7,6 +7,7 @@ require 'faraday'
|
|
7
7
|
require 'singleton'
|
8
8
|
require 'zeitwerk'
|
9
9
|
|
10
|
+
# Provides version exception to camels-case conversion
|
10
11
|
class PreservationClientInflector < Zeitwerk::Inflector
|
11
12
|
def camelize(basename, _abspath)
|
12
13
|
case basename
|
@@ -24,6 +25,7 @@ loader.push_dir(File.absolute_path("#{__FILE__}/../.."))
|
|
24
25
|
loader.setup
|
25
26
|
|
26
27
|
module Preservation
|
28
|
+
# REST API client wrapper for PreservationCatalog with error handling
|
27
29
|
class Client
|
28
30
|
class Error < StandardError; end
|
29
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: preservation-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.1.1
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: A thin client for getting info from SDR preservation.
|