resource_kit 0.1.5 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +38 -0
- data/.github/workflows/publish.yml +28 -0
- data/README.md +13 -0
- data/lib/resource_kit/action.rb +1 -1
- data/lib/resource_kit/resource_collection.rb +3 -1
- data/lib/resource_kit/version.rb +1 -1
- data/resource_kit.gemspec +4 -4
- metadata +17 -14
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 998e100c89b4b7c5efd224b3a44bc75fb33ff2d2e12162786079d82ae054b139
|
|
4
|
+
data.tar.gz: 814ea9ab79e7f2c1ab1f5d6d84bee27933cba90531ee92dbc753d105c213a807
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '086447bea54ea8d6828fd25092eefa6a44deab8936cb110c285cbde418f252d1f86c746ef3517e4709aa2463425dd943efeeb5a5178ab8433ba769eed460ba5d'
|
|
7
|
+
data.tar.gz: aa27564a62e98070c75a2eab47259db166711bf86c0d49b2c66700f2d076b20aa5b0b294ece9f4e49b79835b1dcc9b117a56603ff03ac42891a843f66fac6820
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: true
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ ubuntu-latest, macos-latest ]
|
|
15
|
+
ruby: [ 2.5, 2.6, 2.7, 3.0 ]
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v2
|
|
19
|
+
- uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
|
22
|
+
|
|
23
|
+
# Cache dependencies.
|
|
24
|
+
- uses: actions/cache@v1
|
|
25
|
+
with:
|
|
26
|
+
path: vendor/bundle
|
|
27
|
+
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
28
|
+
restore-keys: |
|
|
29
|
+
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
|
|
30
|
+
|
|
31
|
+
- name: Setup
|
|
32
|
+
run: |
|
|
33
|
+
gem install bundler
|
|
34
|
+
bundle install --jobs 4 --retry 3
|
|
35
|
+
|
|
36
|
+
- name: Test
|
|
37
|
+
run: |
|
|
38
|
+
bundle exec rspec ./spec
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Ruby Gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build + Publish
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
- uses: actions/setup-ruby@v1
|
|
16
|
+
with:
|
|
17
|
+
ruby-version: 2.7.x
|
|
18
|
+
|
|
19
|
+
- name: Publish to RubyGems
|
|
20
|
+
run: |
|
|
21
|
+
mkdir -p $HOME/.gem
|
|
22
|
+
touch $HOME/.gem/credentials
|
|
23
|
+
chmod 0600 $HOME/.gem/credentials
|
|
24
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
25
|
+
gem build resource_kit.gemspec
|
|
26
|
+
gem push *.gem
|
|
27
|
+
env:
|
|
28
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/README.md
CHANGED
|
@@ -163,3 +163,16 @@ Things we've thought about but just haven't implemented are:
|
|
|
163
163
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
164
164
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
165
165
|
5. Create a new Pull Request
|
|
166
|
+
|
|
167
|
+
## Releasing
|
|
168
|
+
|
|
169
|
+
1. Update the [version](./lib/resource_kit/version.rb)
|
|
170
|
+
2. Commit the version and push it to master
|
|
171
|
+
3. Run `rake release`
|
|
172
|
+
|
|
173
|
+
Note: In order to run `rake release` you must be authenticated w/ rubygems.org. To do this, you need to locate the rubygems account information contained within DOs lastpass account (search for rubygems).
|
|
174
|
+
Once you have done this, do the following:
|
|
175
|
+
1. `gem push`
|
|
176
|
+
2. Follow the prompts and add the required information
|
|
177
|
+
3. Run `rake release`
|
|
178
|
+
|
data/lib/resource_kit/action.rb
CHANGED
|
@@ -35,7 +35,7 @@ module ResourceKit
|
|
|
35
35
|
handlers[:any] = block
|
|
36
36
|
else
|
|
37
37
|
response_codes.each do |code|
|
|
38
|
-
code = StatusCodeMapper.code_for(code) unless code.is_a?(
|
|
38
|
+
code = StatusCodeMapper.code_for(code) unless code.is_a?(Integer)
|
|
39
39
|
handlers[code] = block
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'forwardable'
|
|
2
|
+
|
|
1
3
|
module ResourceKit
|
|
2
4
|
class ResourceCollection
|
|
3
5
|
extend Forwardable
|
|
@@ -26,7 +28,7 @@ module ResourceKit
|
|
|
26
28
|
default_handlers[:any] = block
|
|
27
29
|
else
|
|
28
30
|
response_codes.each do |code|
|
|
29
|
-
code = StatusCodeMapper.code_for(code) unless code.is_a?(
|
|
31
|
+
code = StatusCodeMapper.code_for(code) unless code.is_a?(Integer)
|
|
30
32
|
default_handlers[code] = block
|
|
31
33
|
end
|
|
32
34
|
end
|
data/lib/resource_kit/version.rb
CHANGED
data/resource_kit.gemspec
CHANGED
|
@@ -6,8 +6,8 @@ require 'resource_kit/version'
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "resource_kit"
|
|
8
8
|
spec.version = ResourceKit::VERSION
|
|
9
|
-
spec.authors = ["
|
|
10
|
-
spec.email = ["engineering@digitalocean.com"
|
|
9
|
+
spec.authors = ["DigitalOcean Engineering"]
|
|
10
|
+
spec.email = ["api-engineering@digitalocean.com"]
|
|
11
11
|
spec.summary = %q{Resource Kit provides tools to aid in making API Clients. Such as URL resolving, Request / Response layer, and more.}
|
|
12
12
|
spec.description = ''
|
|
13
13
|
spec.homepage = "https://github.com/digitaloceancloud/resource_kit"
|
|
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
|
|
22
|
-
spec.add_dependency 'addressable', '
|
|
22
|
+
spec.add_dependency 'addressable', '< 3.0.0', '>= 2.3.6'
|
|
23
23
|
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 1
|
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
|
25
25
|
spec.add_development_dependency "rake"
|
|
26
26
|
spec.add_development_dependency 'faraday'
|
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resource_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
- Ivan Vanderbyl
|
|
7
|
+
- DigitalOcean Engineering
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: addressable
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
16
|
requirements:
|
|
18
|
-
- - "
|
|
17
|
+
- - "<"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 3.0.0
|
|
20
|
+
- - ">="
|
|
19
21
|
- !ruby/object:Gem::Version
|
|
20
22
|
version: 2.3.6
|
|
21
23
|
type: :runtime
|
|
22
24
|
prerelease: false
|
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
26
|
requirements:
|
|
25
|
-
- - "
|
|
27
|
+
- - "<"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 3.0.0
|
|
30
|
+
- - ">="
|
|
26
31
|
- !ruby/object:Gem::Version
|
|
27
32
|
version: 2.3.6
|
|
28
33
|
- !ruby/object:Gem::Dependency
|
|
@@ -31,14 +36,14 @@ dependencies:
|
|
|
31
36
|
requirements:
|
|
32
37
|
- - "~>"
|
|
33
38
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '1
|
|
39
|
+
version: '2.1'
|
|
35
40
|
type: :development
|
|
36
41
|
prerelease: false
|
|
37
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
43
|
requirements:
|
|
39
44
|
- - "~>"
|
|
40
45
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '1
|
|
46
|
+
version: '2.1'
|
|
42
47
|
- !ruby/object:Gem::Dependency
|
|
43
48
|
name: rake
|
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -125,16 +130,15 @@ dependencies:
|
|
|
125
130
|
version: 0.10.1
|
|
126
131
|
description: ''
|
|
127
132
|
email:
|
|
128
|
-
- engineering@digitalocean.com
|
|
129
|
-
- rross@digitalocean.com
|
|
130
|
-
- ivan@digitalocean.com
|
|
133
|
+
- api-engineering@digitalocean.com
|
|
131
134
|
executables: []
|
|
132
135
|
extensions: []
|
|
133
136
|
extra_rdoc_files: []
|
|
134
137
|
files:
|
|
138
|
+
- ".github/workflows/ci.yml"
|
|
139
|
+
- ".github/workflows/publish.yml"
|
|
135
140
|
- ".gitignore"
|
|
136
141
|
- ".rspec"
|
|
137
|
-
- ".travis.yml"
|
|
138
142
|
- Gemfile
|
|
139
143
|
- LICENSE.txt
|
|
140
144
|
- README.md
|
|
@@ -186,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
186
190
|
- !ruby/object:Gem::Version
|
|
187
191
|
version: '0'
|
|
188
192
|
requirements: []
|
|
189
|
-
|
|
190
|
-
rubygems_version: 2.5.1
|
|
193
|
+
rubygems_version: 3.1.6
|
|
191
194
|
signing_key:
|
|
192
195
|
specification_version: 4
|
|
193
196
|
summary: Resource Kit provides tools to aid in making API Clients. Such as URL resolving,
|