cloudstack_client 1.5.12 → 2.0.0
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 +4 -4
- data/.github/dependabot.yml +23 -0
- data/.github/workflows/ci.yml +57 -0
- data/.github/workflows/release.yml +60 -0
- data/.gitignore +4 -0
- data/.rubocop.yml +33 -0
- data/.rubocop_todo.yml +572 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +5 -0
- data/README.md +118 -23
- data/Rakefile +17 -2
- data/cloudstack_client.gemspec +23 -4
- data/lib/cloudstack_client/api.rb +39 -14
- data/lib/cloudstack_client/cli.rb +1 -1
- data/lib/cloudstack_client/client.rb +4 -1
- data/lib/cloudstack_client/configuration.rb +14 -2
- data/lib/cloudstack_client/connection.rb +26 -62
- data/lib/cloudstack_client/error.rb +1 -0
- data/lib/cloudstack_client/request_handling.rb +91 -0
- data/lib/cloudstack_client/version.rb +1 -1
- data/test/api_test.rb +23 -1
- data/test/client_test.rb +147 -13
- data/test/configuration_test.rb +84 -0
- data/test/connection_test.rb +364 -0
- data/test/data/cloudstack-empty.yml +3 -0
- data/test/data/cloudstack-incomplete.yml +5 -0
- data/test/data/cloudstack-malformed.yml +5 -0
- data/test/data/cloudstack-unsafe.yml +1 -0
- data/test/support/api_stubs.rb +85 -0
- data/test/test_helper.rb +38 -1
- data/test/utils_test.rb +62 -0
- metadata +131 -19
- data/.travis.yml +0 -8
- data/Gemfile.lock +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87ff0b038fbb9bcf2274f9c5ec9fa2cb1bea48cee3f231a84ce1741df43a4eeb
|
|
4
|
+
data.tar.gz: 7476b65e436ad7ebce778a89b0abac81633abf13ebf223c3cd8cabff43ddea7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2b558efce5d172b636685fdce5b5749cdfbcc1eeff144648c756e76cc6aef3b68cb42eeac30d3e4fec71c7089d75ebe305d6a370a7b942dadf3a8f42f58175e
|
|
7
|
+
data.tar.gz: bf07f20fcb83458b2bc7d41f0887df51137f099adb4d562038244ba3141698eb1683c2da1dcb2e036250942519991e4337290fbe4b3d21851830d30e1712ba60
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
- package-ecosystem: bundler
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
groups:
|
|
10
|
+
# Keep routine version bumps to a single PR; majors still arrive alone.
|
|
11
|
+
minor-and-patch:
|
|
12
|
+
update-types:
|
|
13
|
+
- minor
|
|
14
|
+
- patch
|
|
15
|
+
|
|
16
|
+
- package-ecosystem: github-actions
|
|
17
|
+
directory: "/"
|
|
18
|
+
schedule:
|
|
19
|
+
interval: weekly
|
|
20
|
+
groups:
|
|
21
|
+
actions:
|
|
22
|
+
patterns:
|
|
23
|
+
- "*"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: "Ruby ${{ matrix.ruby-version }}"
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
ruby-version: ['3.1', '3.2', '3.3', '3.4', '4.0']
|
|
19
|
+
os: [ubuntu-latest]
|
|
20
|
+
include:
|
|
21
|
+
# Ruby 3.0 is EOL and unavailable on ubuntu-latest, but the gemspec
|
|
22
|
+
# still supports it, so it is verified on the last image that has it.
|
|
23
|
+
- ruby-version: '3.0'
|
|
24
|
+
os: ubuntu-22.04
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
|
|
30
|
+
- name: Set up Ruby
|
|
31
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
32
|
+
with:
|
|
33
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
34
|
+
bundler-cache: true
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: bundle exec rake test
|
|
38
|
+
|
|
39
|
+
- name: Build gem
|
|
40
|
+
run: bundle exec rake build
|
|
41
|
+
|
|
42
|
+
lint:
|
|
43
|
+
name: RuboCop
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- name: Checkout repository
|
|
48
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
49
|
+
|
|
50
|
+
- name: Set up Ruby
|
|
51
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
52
|
+
with:
|
|
53
|
+
ruby-version: '3.4'
|
|
54
|
+
bundler-cache: true
|
|
55
|
+
|
|
56
|
+
- name: Run RuboCop
|
|
57
|
+
run: bundle exec rubocop --format github
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
verify:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout repository
|
|
16
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
|
|
18
|
+
- name: Set up Ruby
|
|
19
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: '3.2'
|
|
22
|
+
bundler-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Run tests
|
|
25
|
+
run: bundle exec rake test
|
|
26
|
+
|
|
27
|
+
- name: Ensure version is bumped
|
|
28
|
+
run: |
|
|
29
|
+
CURRENT_VERSION="$(ruby -Ilib -e "require 'cloudstack_client/version'; puts CloudstackClient::VERSION")"
|
|
30
|
+
LATEST_JSON="$(curl -fsSL https://rubygems.org/api/v1/versions/cloudstack_client/latest.json || true)"
|
|
31
|
+
if [ -n "$LATEST_JSON" ]; then
|
|
32
|
+
LATEST_VERSION="$(printf '%s' "$LATEST_JSON" | ruby -rjson -e "puts JSON.parse(STDIN.read)['version']")"
|
|
33
|
+
ruby -e "require 'rubygems/version'; current = Gem::Version.new('$CURRENT_VERSION'); latest = Gem::Version.new('$LATEST_VERSION'); abort(\"Version must be bumped before building (current=#{current}, latest=#{latest})\") unless current > latest"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
- name: Build gem
|
|
37
|
+
run: bundle exec rake build
|
|
38
|
+
|
|
39
|
+
publish:
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
needs: verify
|
|
42
|
+
environment: rubygems
|
|
43
|
+
permissions:
|
|
44
|
+
contents: write
|
|
45
|
+
id-token: write
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout repository
|
|
51
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
52
|
+
|
|
53
|
+
- name: Set up Ruby
|
|
54
|
+
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
|
|
55
|
+
with:
|
|
56
|
+
ruby-version: '3.2'
|
|
57
|
+
bundler-cache: true
|
|
58
|
+
|
|
59
|
+
- name: Publish gem to RubyGems
|
|
60
|
+
uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
plugins:
|
|
2
|
+
- rubocop-minitest
|
|
3
|
+
- rubocop-rake
|
|
4
|
+
|
|
5
|
+
AllCops:
|
|
6
|
+
TargetRubyVersion: 3.0
|
|
7
|
+
NewCops: enable
|
|
8
|
+
SuggestExtensions: false
|
|
9
|
+
Exclude:
|
|
10
|
+
- 'data/**/*'
|
|
11
|
+
- 'test/data/**/*'
|
|
12
|
+
- 'vendor/**/*'
|
|
13
|
+
|
|
14
|
+
inherit_from: .rubocop_todo.yml
|
|
15
|
+
|
|
16
|
+
# This gem predates frozen string literals and does not mutate string literals
|
|
17
|
+
# in place; enabling this would be churn without benefit.
|
|
18
|
+
Style/FrozenStringLiteralComment:
|
|
19
|
+
Enabled: false
|
|
20
|
+
|
|
21
|
+
# Documentation lives in the README rather than as class level comments.
|
|
22
|
+
Style/Documentation:
|
|
23
|
+
Enabled: false
|
|
24
|
+
|
|
25
|
+
# A gemspec is one long block by construction, and test suites are long blocks
|
|
26
|
+
# of describe/it. Neither is a useful complexity signal.
|
|
27
|
+
Metrics/BlockLength:
|
|
28
|
+
Exclude:
|
|
29
|
+
- 'test/**/*'
|
|
30
|
+
- '*.gemspec'
|
|
31
|
+
|
|
32
|
+
Layout/LineLength:
|
|
33
|
+
Max: 120
|