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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3e72f59fd17b0ef985fb4ede247f9c598aa729a57aee3df6cf3b03bb58df68d
4
- data.tar.gz: 5b91b5227bfbeca9e0e1df2162fc66ef19ca871570ea9709a076d697b4b3295e
3
+ metadata.gz: e3d54508719f54afb0229364f2e9deee3a765d14359b5b27bf3424470193d68c
4
+ data.tar.gz: 48642fbe62b2f68bf896ada3629a8e9e662e6e4e65a988fbcd49c0188f5f7487
5
5
  SHA512:
6
- metadata.gz: fb5818a17c85a4cc2695ea369f7eae4fd499a7cced7334522d9e508f5cd0c11be78161d7547d1b5c28a33c0c99fef3dff6dedf9caf914b546b610c99be43fa23
7
- data.tar.gz: a91fb05d81e242b25a0ffafd7f146e201b1774d7cc49d8d2c58d2cbbca2406303411d51e64908b9e022b8a4488b86da07b98fc2a22771b92a71128812b9fa0cb
6
+ metadata.gz: 8a10daad6e088616be9af53476d244c7fc7fc3a027db67f0197c0f19248962108f035ac70fda19386e9ac75babd234ea874741b4d90604346a44e6b49106e57b
7
+ data.tar.gz: 6991d66c54291b48ad76e5ac37b14200d965b4ec3e0bb5903bd2f9250619e6fd9ca2c53d6d579009e1db2a548a05649982d42d45b2cb86877ddb295290fa61c7
data/.rubocop.yml CHANGED
@@ -23,7 +23,7 @@ Metrics/MethodLength:
23
23
  Style/Documentation:
24
24
  Exclude:
25
25
  - 'spec/**/*'
26
- - 'lib/preservation/client.rb'
26
+
27
27
 
28
28
  Style/WordArray:
29
29
  Enabled: false
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Preservation
4
4
  class Client
5
- VERSION = '1.0.0'
5
+ VERSION = '2.0.0'
6
6
  end
7
7
  end
@@ -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
@@ -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: 1.0.0
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 00:00:00.000000000 Z
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.0.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.