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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84c338c470de7977936e22dae4a7e410a289d3c8211a62927a739645410adad6
4
- data.tar.gz: 90acc47cfd00eb091504c8219e7e6b4376213dc7fc816c43cdce2aa2df54bf81
3
+ metadata.gz: c009f995726401b9fd781b18796903276b19c2aabb3d6ec8722d60a36ea86600
4
+ data.tar.gz: 3985545e091850851567ebc1706252da34922120222dd491ca7ae58928e30b19
5
5
  SHA512:
6
- metadata.gz: 68e243484eb0b0554fd225ab71775745bba1426edddf0916a21079e5bf13cd62e57ce1f36129e5c57a2d2fd8a817bd47b4fb68b6340ea9f430edc3380e2616dc
7
- data.tar.gz: e3a05272dbdbcf2cef2b1ab59bdcff5aef5ef527ee62d31d8006d148c7869deba3c09b01120a975b6e3b6eb448086e3790fc84be82976fc8fafb8071cf43d991
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
- Bump version in `lib/archivesspace/client/version.rb` then:
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
@@ -12,3 +12,7 @@ require 'cucumber/rake/task'
12
12
  Cucumber::Rake::Task.new
13
13
 
14
14
  task default: %i[spec cucumber]
15
+
16
+ task :version do
17
+ puts ArchivesSpace::Client::VERSION
18
+ end
@@ -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
 
@@ -36,7 +36,7 @@ users_with_roles = {
36
36
  }
37
37
 
38
38
  begin
39
- client.config.base_repo = "repositories/2"
39
+ client.config.base_repo = 'repositories/2'
40
40
  results = client.group_user_assignment users_with_roles
41
41
  ap results.map(&:parsed)
42
42
  rescue ArchivesSpace::RequestError => e
@@ -13,7 +13,7 @@ module ArchivesSpace
13
13
  archival_objects
14
14
  digital_objects
15
15
  groups
16
- repositiories
16
+ repositories
17
17
  resources
18
18
  subjects
19
19
  users
@@ -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] = options[:headers] ? default_headers(@method).merge(options[:headers]) : default_headers(@method)
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ArchivesSpace
4
4
  class Client
5
- VERSION = '0.1.11'
5
+ VERSION = '0.1.12'
6
6
  end
7
7
  end
@@ -23,4 +23,4 @@ describe ArchivesSpace::Template do
23
23
  json = JSON.parse(ArchivesSpace::Template.process(:repository_with_agent, data))
24
24
  expect(json['repository']['repo_code']).to eq data[:repo_code]
25
25
  end
26
- end
26
+ end
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.11
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: 2021-11-23 00:00:00.000000000 Z
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.1.6
289
+ rubygems_version: 3.3.16
274
290
  signing_key:
275
291
  specification_version: 4
276
292
  summary: Interact with ArchivesSpace via the API.