archivesspace-client 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +22 -0
- data/.github/workflows/publish.yml +42 -0
- data/README.md +2 -11
- data/Rakefile +4 -0
- data/archivesspace-client.gemspec +1 -0
- data/examples/user_groups.rb +1 -1
- data/lib/archivesspace/client/pagination.rb +1 -1
- data/lib/archivesspace/client/request.rb +2 -1
- data/lib/archivesspace/client/version.rb +1 -1
- data/spec/archivesspace/templates_spec.rb +1 -1
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c009f995726401b9fd781b18796903276b19c2aabb3d6ec8722d60a36ea86600
|
4
|
+
data.tar.gz: 3985545e091850851567ebc1706252da34922120222dd491ca7ae58928e30b19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef5a03e03271cb24133b3f82e2304162a5ede929453bb4af99edc8f011f260f204b390960b30ed691bd569af15813f0a0ee9e8063d4599d78e69eb833aad5b17
|
7
|
+
data.tar.gz: ef541e1ebd699335e4333d195a7ac3e5a554b96543c2f1432e26c056751d584b7a7f1db0c4c0369cbc881e9c6b626286414103b728f778b69a81af1511678eb9
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [pull_request]
|
3
|
+
|
4
|
+
# TODO: add linters (rubocop)
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
tests:
|
8
|
+
name: Tests
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- name: Checkout code
|
12
|
+
uses: actions/checkout@v3
|
13
|
+
|
14
|
+
- name: Setup Ruby and install gems
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
bundler-cache: true
|
18
|
+
ruby-version: 2.7
|
19
|
+
|
20
|
+
- name: Run tests
|
21
|
+
run: |
|
22
|
+
bundle exec rake
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
- master
|
8
|
+
jobs:
|
9
|
+
publish:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
permissions:
|
12
|
+
contents: write
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
|
17
|
+
- name: Setup Ruby and install gems
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
bundler-cache: true
|
21
|
+
ruby-version: 2.7
|
22
|
+
rubygems: latest
|
23
|
+
|
24
|
+
- name: Release Gem
|
25
|
+
run: |
|
26
|
+
VERSION=$(ruby -e "puts eval(File.read('$GEM_NAME.gemspec')).version")
|
27
|
+
GEM_VERSION=$(gem list --exact --remote $GEM_NAME)
|
28
|
+
|
29
|
+
# Publish to RubyGems.org
|
30
|
+
if [ "${GEM_VERSION}" != "$GEM_NAME (${VERSION})" ]; then
|
31
|
+
gem build $GEM_NAME.gemspec
|
32
|
+
gem push "$GEM_NAME-${VERSION}.gem"
|
33
|
+
fi
|
34
|
+
|
35
|
+
# Create a release tag
|
36
|
+
if ! git ls-remote --tags --exit-code origin v${VERSION}; then
|
37
|
+
git tag v${VERSION}
|
38
|
+
git push --tags
|
39
|
+
fi
|
40
|
+
env:
|
41
|
+
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
|
42
|
+
GEM_NAME: archivesspace-client
|
data/README.md
CHANGED
@@ -161,17 +161,8 @@ bundle exec rake
|
|
161
161
|
|
162
162
|
## Publishing
|
163
163
|
|
164
|
-
|
165
|
-
|
166
|
-
```bash
|
167
|
-
VERSION=$NEW_VERSION
|
168
|
-
gem build archivesspace-client
|
169
|
-
git add . && git commit -m "Bump to $VERSION"
|
170
|
-
git tag v$VERSION
|
171
|
-
git push origin master
|
172
|
-
git push --tags
|
173
|
-
gem push archivesspace-client-$VERSION.gem
|
174
|
-
```
|
164
|
+
When an updated version (`lib/archivesspace/client/version.rb`) is merged into the
|
165
|
+
main/master branch a new release will be built and published.
|
175
166
|
|
176
167
|
## Contributing
|
177
168
|
|
data/Rakefile
CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'json_spec'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
29
|
spec.add_development_dependency 'rspec', '3.6.0'
|
30
|
+
spec.add_development_dependency 'rubocop'
|
30
31
|
spec.add_development_dependency 'vcr', '3.0.3'
|
31
32
|
spec.add_development_dependency 'webmock', '3.0.1'
|
32
33
|
|
data/examples/user_groups.rb
CHANGED
@@ -26,7 +26,8 @@ module ArchivesSpace
|
|
26
26
|
@method = method.downcase.to_sym
|
27
27
|
@path = path.gsub(%r{^/+}, '')
|
28
28
|
@options = options
|
29
|
-
@options[:headers] =
|
29
|
+
@options[:headers] =
|
30
|
+
options[:headers] ? default_headers(@method).merge(options[:headers]) : default_headers(@method)
|
30
31
|
@options[:verify] = config.verify_ssl
|
31
32
|
@options[:query] = {} unless options.key? :query
|
32
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archivesspace-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Cooper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 3.6.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: vcr
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +227,8 @@ executables: []
|
|
213
227
|
extensions: []
|
214
228
|
extra_rdoc_files: []
|
215
229
|
files:
|
230
|
+
- ".github/workflows/ci.yml"
|
231
|
+
- ".github/workflows/publish.yml"
|
216
232
|
- ".gitignore"
|
217
233
|
- ".rspec"
|
218
234
|
- ".travis.yml"
|
@@ -270,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
286
|
- !ruby/object:Gem::Version
|
271
287
|
version: '0'
|
272
288
|
requirements: []
|
273
|
-
rubygems_version: 3.
|
289
|
+
rubygems_version: 3.3.16
|
274
290
|
signing_key:
|
275
291
|
specification_version: 4
|
276
292
|
summary: Interact with ArchivesSpace via the API.
|