foreman_api_client 1.0.1 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26447bbfa40259e753798ee83d0bbecf53aaa6bac5b160efaa0474a0fab28285
4
- data.tar.gz: c95bd8c78d936130119f5fe7e4a65850e60288195a2439c90280a7d74ae4c065
3
+ metadata.gz: 84f52cfb312b85ddfe431472ea41512f265cf08b42c040c6081f97e11c8ac971
4
+ data.tar.gz: c28a2d4f9a434080e4b9cd7bfcad0e4072d54f9a8aa5d365bc9fca91dc7e1c45
5
5
  SHA512:
6
- metadata.gz: 92aeb7f4432a686713cd264bd3c2404752c8f1792dfcdd6b37f942e429dd52b49b3128e4d2be375475c8a91d9997f072190abfe546d82f647c99eed64a23a683
7
- data.tar.gz: 1b57f8d7a8dcdf6cc729e7b70b54b2323a9abaac9a9fa9ffd3f67c6e705c6d9e5f67153c9de93544da44f17ffed385ee0555bd94c9a281e832889326f26bb8a7
6
+ metadata.gz: 73512cb83f5a851c04189838ea186e841f35c235fb746e65a269e79de07c6daf3c680c535dd3820caa336aeedf91b208e0fc0b0b93035fd06d99b9e66c4dc0fe
7
+ data.tar.gz: 342220033c10d96302648591c56cd3aef256ae6237378c3ebd39b04f7f10a940ed4589eaad198dd9e0d2044d222dab1646a664147ba3ac6eac9f9b93ca1dfbf9
data/.codeclimate.yml ADDED
@@ -0,0 +1,16 @@
1
+ prepare:
2
+ fetch:
3
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
4
+ path: ".rubocop_base.yml"
5
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
6
+ path: ".rubocop_cc_base.yml"
7
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
8
+ path: styles/base.yml
9
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
10
+ path: styles/cc_base.yml
11
+ plugins:
12
+ rubocop:
13
+ enabled: true
14
+ config: ".rubocop_cc.yml"
15
+ channel: rubocop-1-56-3
16
+ version: '2'
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: CI
3
+ on:
4
+ push:
5
+ pull_request:
6
+ schedule:
7
+ - cron: 0 0 * * 0
8
+ jobs:
9
+ ci:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby-version:
14
+ - '2.5'
15
+ - '2.6'
16
+ - '2.7'
17
+ - '3.0'
18
+ - '3.1'
19
+ env:
20
+ CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: "${{ matrix.ruby-version }}"
27
+ bundler-cache: true
28
+ timeout-minutes: 30
29
+ - name: Run tests
30
+ run: bundle exec rake
31
+ - name: Report code coverage
32
+ if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.1' }}
33
+ continue-on-error: true
34
+ uses: paambaati/codeclimate-action@v9
data/.rubocop.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_gem:
2
+ manageiq-style: ".rubocop_base.yml"
3
+ inherit_from:
4
+ - ".rubocop_local.yml"
data/.rubocop_cc.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
File without changes
data/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "ManageIQ/whitesource-config@master"
3
+ }
data/CHANGELOG.md CHANGED
@@ -6,9 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.0] - 2025-10-01
10
+ ### Added
11
+ - Support setting `ssl_ca_file` [[#35](https://github.com/ManageIQ/foreman_api_client/pull/35)]
12
+
13
+ ## [1.0.2] - 2022-09-08
14
+ ### Changed
15
+ - Support Ruby 3.0 [[#20](https://github.com/ManageIQ/foreman_api_client/pull/20)]
16
+
9
17
  ## [1.0.1] - 2020-05-19
10
18
  ### Changed
11
- - Update rest-client to `~>2.0` #11
19
+ - Update rest-client to `~>2.0` [[#11](https://github.com/ManageIQ/foreman_api_client/pull/11)]
12
20
 
13
21
  ## [1.0.0] - 2020-02-18
14
22
  ### Changed
@@ -23,7 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
31
  - Extracted from https://github.com/ManageIQ/manageiq/tree/master/gems/manageiq_foreman
24
32
  - Move inventory logic to Foreman provider refresher in ManageIQ/manageiq
25
33
 
26
- [Unreleased]: https://github.com/ManageIQ/foreman_api_client/compare/v1.0.1...HEAD
27
- [1.0.0]: https://github.com/ManageIQ/foreman_api_client/compare/v1.0.0...v1.0.1
34
+ [Unreleased]: https://github.com/ManageIQ/foreman_api_client/compare/v1.0.2...HEAD
35
+ [1.0.2]: https://github.com/ManageIQ/foreman_api_client/compare/v1.0.1...v1.0.2
36
+ [1.0.1]: https://github.com/ManageIQ/foreman_api_client/compare/v1.0.0...v1.0.1
28
37
  [1.0.0]: https://github.com/ManageIQ/foreman_api_client/compare/v0.1.0...v1.0.0
29
38
  [0.1.0]: https://github.com/ManageIQ/foreman_api_client/releases/tag/v0.1.0
data/Gemfile CHANGED
@@ -2,7 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in foreman_api_client.gemspec
4
4
  gemspec
5
-
6
- group :test do
7
- gem "codeclimate-test-reporter", :require => false
8
- end
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # Foreman API Client
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/foreman_api_client.svg)](http://badge.fury.io/rb/foreman_api_client)
4
- [![Build Status](https://travis-ci.org/ManageIQ/foreman_api_client.svg)](https://travis-ci.org/ManageIQ/foreman_api_client)
4
+ [![CI](https://github.com/ManageIQ/foreman_api_client/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/foreman_api_client/actions/workflows/ci.yaml)
5
5
  [![Code Climate](https://codeclimate.com/github/ManageIQ/foreman_api_client/badges/gpa.svg)](https://codeclimate.com/github/ManageIQ/foreman_api_client)
6
6
  [![Test Coverage](https://codeclimate.com/github/ManageIQ/foreman_api_client/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/foreman_api_client/coverage)
7
- [![Security](https://hakiri.io/github/ManageIQ/foreman_api_client/master.svg)](https://hakiri.io/github/ManageIQ/foreman_api_client/master)
8
7
 
9
8
  A simple wrapper around Apipie-bindings to provide Ruby classes for [Foreman](https://theforeman.org/).
10
9
 
@@ -24,10 +23,11 @@ And then execute:
24
23
  require 'foreman_api_client'
25
24
  ForemanApiClient.logger = Logger.new(STDOUT)
26
25
  connection = ForemanApiClient::Connection.new(
27
- :base_url => base_url,
28
- :username => username,
29
- :password => password,
30
- :verify_ssl => verify_ssl
26
+ base_url: 'https://foreman.example.com',
27
+ username: 'API_USER',
28
+ password: 'API_PASSWORD',
29
+ verify_ssl: true, # optional: Defaults to `true`
30
+ ssl_ca_file: '/path/to/ssl_ca_file.pem', # optional: Path to CA certificate file.
31
31
  )
32
32
  c.host(1)
33
33
  => #<ForemanApiClient::Host:0x0055b8a05daa58 ...>
@@ -19,12 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "apipie-bindings", "= 0.0.15"
22
+ spec.add_runtime_dependency "apipie-bindings", "= 0.4.0"
23
23
  spec.add_runtime_dependency "rest-client", "~> 2.0"
24
24
 
25
- spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
25
+ spec.add_development_dependency "manageiq-style"
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "rspec"
28
- spec.add_development_dependency "vcr", "~> 3.0.2"
29
- spec.add_development_dependency "webmock", "~> 2.3.1"
28
+ spec.add_development_dependency "simplecov", ">= 0.21.2"
29
+ spec.add_development_dependency "vcr", "~> 3.0.2"
30
+ spec.add_development_dependency "webmock", "~> 2.3.1"
30
31
  end
@@ -10,7 +10,10 @@ module ForemanApiClient
10
10
  connection_attrs[:uri] = connection_attrs.delete(:base_url)
11
11
  connection_attrs[:api_version] ||= 2
12
12
  connection_attrs[:apidoc_cache_dir] ||= tmpdir
13
- options = {:verify_ssl => connection_attrs.delete(:verify_ssl)}
13
+ options = {
14
+ verify_ssl: connection_attrs.delete(:verify_ssl),
15
+ ssl_ca_file: connection_attrs.delete(:ssl_ca_file)
16
+ }.compact
14
17
  @api = ApipieBindings::API.new(connection_attrs, options)
15
18
  end
16
19
 
@@ -1,3 +1,3 @@
1
1
  module ForemanApiClient
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
data/renovate.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "inheritConfig": true,
4
+ "inheritConfigRepoName": "manageiq/renovate-config"
5
+ }
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keenan Brock
8
8
  - Brandon Dunne
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2020-05-19 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: apipie-bindings
@@ -17,14 +16,14 @@ dependencies:
17
16
  requirements:
18
17
  - - '='
19
18
  - !ruby/object:Gem::Version
20
- version: 0.0.15
19
+ version: 0.4.0
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - '='
26
25
  - !ruby/object:Gem::Version
27
- version: 0.0.15
26
+ version: 0.4.0
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: rest-client
30
29
  requirement: !ruby/object:Gem::Requirement
@@ -40,19 +39,19 @@ dependencies:
40
39
  - !ruby/object:Gem::Version
41
40
  version: '2.0'
42
41
  - !ruby/object:Gem::Dependency
43
- name: codeclimate-test-reporter
42
+ name: manageiq-style
44
43
  requirement: !ruby/object:Gem::Requirement
45
44
  requirements:
46
- - - "~>"
45
+ - - ">="
47
46
  - !ruby/object:Gem::Version
48
- version: 1.0.0
47
+ version: '0'
49
48
  type: :development
50
49
  prerelease: false
51
50
  version_requirements: !ruby/object:Gem::Requirement
52
51
  requirements:
53
- - - "~>"
52
+ - - ">="
54
53
  - !ruby/object:Gem::Version
55
- version: 1.0.0
54
+ version: '0'
56
55
  - !ruby/object:Gem::Dependency
57
56
  name: rake
58
57
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +80,20 @@ dependencies:
81
80
  - - ">="
82
81
  - !ruby/object:Gem::Version
83
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.21.2
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.21.2
84
97
  - !ruby/object:Gem::Dependency
85
98
  name: vcr
86
99
  requirement: !ruby/object:Gem::Requirement
@@ -117,9 +130,14 @@ executables: []
117
130
  extensions: []
118
131
  extra_rdoc_files: []
119
132
  files:
133
+ - ".codeclimate.yml"
134
+ - ".github/workflows/ci.yaml"
120
135
  - ".gitignore"
121
136
  - ".rspec"
122
- - ".travis.yml"
137
+ - ".rubocop.yml"
138
+ - ".rubocop_cc.yml"
139
+ - ".rubocop_local.yml"
140
+ - ".whitesource"
123
141
  - CHANGELOG.md
124
142
  - Gemfile
125
143
  - LICENSE.txt
@@ -135,11 +153,11 @@ files:
135
153
  - lib/foreman_api_client/null_logger.rb
136
154
  - lib/foreman_api_client/paged_response.rb
137
155
  - lib/foreman_api_client/version.rb
156
+ - renovate.json
138
157
  homepage: https://github.com/ManageIQ/foreman_api_client
139
158
  licenses:
140
159
  - Apache-2.0
141
160
  metadata: {}
142
- post_install_message:
143
161
  rdoc_options: []
144
162
  require_paths:
145
163
  - lib
@@ -154,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
172
  - !ruby/object:Gem::Version
155
173
  version: '0'
156
174
  requirements: []
157
- rubygems_version: 3.0.6
158
- signing_key:
175
+ rubygems_version: 3.6.7
159
176
  specification_version: 4
160
177
  summary: Foreman apipie-bindings wrapper
161
178
  test_files: []
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.4"
4
- - "2.5"
5
- - "2.6"
6
- - ruby-head
7
- - jruby-head
8
- sudo: false
9
- cache: bundler
10
- after_script: bundle exec codeclimate-test-reporter
11
- matrix:
12
- allow_failures:
13
- - rvm: ruby-head
14
- - rvm: jruby-head
15
- fast_finish: true