preservation-client 3.3.0 → 3.3.1

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: 295c6b5719f6730587b25339215cb69a2a0577c83bb703cc0bc17bb0372b64e3
4
- data.tar.gz: 26c60ca8f89488ed4d8e9ee301fb1632727ddb852ddaf4f2db796cf97f0a51f3
3
+ metadata.gz: cd8382e6e4993d58f70000d22aa01ed1445ce9e04c936b925c8c7d95ba0aa082
4
+ data.tar.gz: c8d2c619e732d4d2767f565df028b24cdd68d7f6c08a22213bb60be74302756f
5
5
  SHA512:
6
- metadata.gz: 9d715a4987ea8c1091ba263eed8975feb66ab15e58669011860376a43ce7c80f7bbf771701f4416e9309fe7fb1dfa08e7986c0d7bf556bab939eab419e4c3fae
7
- data.tar.gz: 2f27d27f5c0c02b0a9fb18943e5c25228e6e6d0f5ca24e190da9d7de20146f8f80d437f1351f659a627178ea52933c185aea811dcad6eff82586d6977ff6e733
6
+ metadata.gz: d615d2d61a5beaa03c21a43e3df4808fc3b7fec90a674c5cfdb82dd8438801eb72e66f863424852717eaaf51fe8891736599aed0a21c2dc571b9d8b59bfde6c6
7
+ data.tar.gz: 0cfa10e23ab7a1baa0d0748df1189b31d95a44f1711ceab5ece29ee61c19a8e056dd1eaabfa73dd492c96e66fefa56297ba1f795b276d57f3fba8f65961d9bc1
@@ -0,0 +1,35 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ build:
5
+ docker:
6
+ - image: circleci/ruby:2.7.1
7
+ environment:
8
+ CC_TEST_REPORTER_ID: 02e8afad8d0b699828dd69b6f45b598e7317b2d9828ea23380c3a97113068a0c
9
+ RAILS_ENV: test
10
+ steps:
11
+ - checkout
12
+ - run:
13
+ name: Install Bundler
14
+ command: gem install bundler
15
+ - run:
16
+ name: Which bundler?
17
+ command: bundle -v
18
+ - run:
19
+ name: Bundle Install
20
+ command: bundle check || bundle install
21
+ - run:
22
+ name: Lint using rubocop
23
+ command: bundle exec rubocop
24
+ - run:
25
+ name: Setup Code Climate test-reporter
26
+ command: |
27
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
28
+ chmod +x ./cc-test-reporter
29
+ ./cc-test-reporter before-build
30
+ - run:
31
+ name: rspec
32
+ command: bundle exec rspec
33
+ - run:
34
+ name: upload test coverage report to Code Climate
35
+ command: ./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/preservation-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)
2
+ [![CircleCI](https://circleci.com/gh/sul-dlss/preservation-client.svg?style=svg)](https://circleci.com/gh/sul-dlss/preservation-client)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/00d2d8957226777105b3/maintainability)](https://codeclimate.com/github/sul-dlss/preservation-client/maintainability)
4
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/00d2d8957226777105b3/test_coverage)](https://codeclimate.com/github/sul-dlss/preservation-client/test_coverage)
5
5
 
@@ -92,6 +92,10 @@ Note that the preservation service is behind a firewall.
92
92
 
93
93
  - `client.objects.primary_moab_location(druid: 'ooo000oo0000')` - returns the path to the storage location for the primary moab
94
94
 
95
+ ### Validate the Moab
96
+
97
+ - `client.objects.validate_moab(druid: 'ooo000oo0000')` - validates that the Moab object, used by preservationWF to ensure we have a valid Moab before replicating to various preservation endpoints
98
+
95
99
  ### Get difference information between passed contentMetadata.xml and files in the Moab
96
100
 
97
101
  - `client.objects.content_inventory_diff(druid: 'oo000oo0000', content_metadata: '<contentMetadata>...</contentMetadata>')` - returns Moab::FileInventoryDifference containing differences between passed content metadata and latest version for subset 'all'
@@ -71,6 +71,15 @@ module Preservation
71
71
  file(druid, 'metadata', filepath, version)
72
72
  end
73
73
 
74
+ # calls the endpoint to queue a ValidateMoab job for a specific druid
75
+ # typically called by a preservationIngestWF robot
76
+ # @param [String] druid - with or without prefix: 'druid:ab123cd4567' or 'ab123cd4567'
77
+ # @return [String] "ok" when job queued
78
+ # @raise [Preservation::Client::NotFoundError] when druid is not found
79
+ def validate_moab(druid:)
80
+ get("objects/#{druid}/validate_moab", {}, on_data: nil)
81
+ end
82
+
74
83
  # retrieve the storage location for the primary moab of the given druid
75
84
  # @param [String] druid - with or without prefix: 'druid:ab123cd4567' or 'ab123cd4567'
76
85
  # @return [String] the storage location of the primary moab for the given druid
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Preservation
4
4
  class Client
5
- VERSION = '3.3.0'
5
+ VERSION = '3.3.1'
6
6
  end
7
7
  end
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: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-02 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -184,12 +184,12 @@ executables: []
184
184
  extensions: []
185
185
  extra_rdoc_files: []
186
186
  files:
187
+ - ".circleci/config.yml"
187
188
  - ".github/pull_request_template.md"
188
189
  - ".gitignore"
189
190
  - ".rspec"
190
191
  - ".rubocop.yml"
191
192
  - ".rubocop_todo.yml"
192
- - ".travis.yml"
193
193
  - Gemfile
194
194
  - LICENSE
195
195
  - README.md
@@ -210,7 +210,7 @@ metadata:
210
210
  allowed_push_host: https://rubygems.org/
211
211
  homepage_uri: https://github.com/sul-dlss/preservation-client
212
212
  source_code_uri: https://github.com/sul-dlss/preservation-client.
213
- post_install_message:
213
+ post_install_message:
214
214
  rdoc_options: []
215
215
  require_paths:
216
216
  - lib
@@ -225,8 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.0.6
229
- signing_key:
228
+ rubygems_version: 3.2.19
229
+ signing_key:
230
230
  specification_version: 4
231
231
  summary: A thin client for getting info from SDR preservation.
232
232
  test_files: []
data/.travis.yml DELETED
@@ -1,25 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5.3
5
- - 2.6.4
6
- - 2.7.1
7
-
8
- env:
9
- jobs:
10
- - RAILS_VERSION=5.2.3
11
- - RAILS_VERSION=6.0.0
12
- global:
13
- - CC_TEST_REPORTER_ID=02e8afad8d0b699828dd69b6f45b598e7317b2d9828ea23380c3a97113068a0c
14
-
15
- before_install: gem install bundler -v 2.1.2
16
-
17
- before_script:
18
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
19
- - chmod +x ./cc-test-reporter
20
- - ./cc-test-reporter before-build
21
- after_script:
22
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
23
-
24
- notifications:
25
- email: false