pulp_certguard_client 3.69.1 → 3.70.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/README.md +9 -5
 - data/docs/CertguardRHSMCertGuard.md +12 -11
 - data/docs/CertguardRHSMCertGuardResponse.md +20 -19
 - data/docs/CertguardX509CertGuard.md +12 -11
 - data/docs/CertguardX509CertGuardResponse.md +20 -19
 - data/docs/ContentguardsRhsmApi.md +195 -94
 - data/docs/ContentguardsX509Api.md +195 -94
 - data/docs/PaginatedcertguardRHSMCertGuardResponseList.md +14 -13
 - data/docs/PaginatedcertguardX509CertGuardResponseList.md +14 -13
 - data/docs/PatchedcertguardRHSMCertGuard.md +12 -11
 - data/docs/PatchedcertguardX509CertGuard.md +12 -11
 - data/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb +42 -27
 - data/lib/pulp_certguard_client/api/contentguards_x509_api.rb +42 -27
 - data/lib/pulp_certguard_client/api_client.rb +137 -102
 - data/lib/pulp_certguard_client/api_error.rb +2 -1
 - data/lib/pulp_certguard_client/configuration.rb +162 -21
 - data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard.rb +34 -22
 - data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard_response.rb +36 -24
 - data/lib/pulp_certguard_client/models/certguard_x509_cert_guard.rb +34 -22
 - data/lib/pulp_certguard_client/models/certguard_x509_cert_guard_response.rb +36 -24
 - data/lib/pulp_certguard_client/models/paginatedcertguard_rhsm_cert_guard_response_list.rb +34 -22
 - data/lib/pulp_certguard_client/models/paginatedcertguard_x509_cert_guard_response_list.rb +34 -22
 - data/lib/pulp_certguard_client/models/patchedcertguard_rhsm_cert_guard.rb +40 -24
 - data/lib/pulp_certguard_client/models/patchedcertguard_x509_cert_guard.rb +40 -24
 - data/lib/pulp_certguard_client/version.rb +2 -2
 - data/lib/pulp_certguard_client.rb +1 -1
 - data/pulp_certguard_client.gemspec +9 -6
 - data/spec/api/contentguards_rhsm_api_spec.rb +7 -7
 - data/spec/api/contentguards_x509_api_spec.rb +7 -7
 - data/spec/models/certguard_rhsm_cert_guard_response_spec.rb +13 -18
 - data/spec/models/certguard_rhsm_cert_guard_spec.rb +9 -14
 - data/spec/models/certguard_x509_cert_guard_response_spec.rb +13 -18
 - data/spec/models/certguard_x509_cert_guard_spec.rb +9 -14
 - data/spec/models/paginatedcertguard_rhsm_cert_guard_response_list_spec.rb +10 -15
 - data/spec/models/paginatedcertguard_x509_cert_guard_response_list_spec.rb +10 -15
 - data/spec/models/patchedcertguard_rhsm_cert_guard_spec.rb +9 -14
 - data/spec/models/patchedcertguard_x509_cert_guard_spec.rb +9 -14
 - data/spec/spec_helper.rb +1 -1
 - metadata +41 -17
 - data/spec/api_client_spec.rb +0 -188
 - data/spec/configuration_spec.rb +0 -42
 
    
        metadata
    CHANGED
    
    | 
         @@ -1,15 +1,35 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pulp_certguard_client
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 3.70.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - OpenAPI-Generator
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2025- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-02-04 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: faraday-net_http
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '2.0'
         
     | 
| 
      
 20 
     | 
    
         
            +
                - - "<"
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 22 
     | 
    
         
            +
                    version: '3.1'
         
     | 
| 
      
 23 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 24 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 25 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 26 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 27 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 29 
     | 
    
         
            +
                    version: '2.0'
         
     | 
| 
      
 30 
     | 
    
         
            +
                - - "<"
         
     | 
| 
      
 31 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 32 
     | 
    
         
            +
                    version: '3.1'
         
     | 
| 
       13 
33 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
34 
     | 
    
         
             
              name: faraday
         
     | 
| 
       15 
35 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -19,7 +39,7 @@ dependencies: 
     | 
|
| 
       19 
39 
     | 
    
         
             
                    version: 1.0.1
         
     | 
| 
       20 
40 
     | 
    
         
             
                - - "<"
         
     | 
| 
       21 
41 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: '2. 
     | 
| 
      
 42 
     | 
    
         
            +
                    version: '2.9'
         
     | 
| 
       23 
43 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
44 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
45 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -29,27 +49,35 @@ dependencies: 
     | 
|
| 
       29 
49 
     | 
    
         
             
                    version: 1.0.1
         
     | 
| 
       30 
50 
     | 
    
         
             
                - - "<"
         
     | 
| 
       31 
51 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: '2. 
     | 
| 
      
 52 
     | 
    
         
            +
                    version: '2.9'
         
     | 
| 
       33 
53 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
     | 
    
         
            -
              name:  
     | 
| 
      
 54 
     | 
    
         
            +
              name: faraday-multipart
         
     | 
| 
       35 
55 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       36 
56 
     | 
    
         
             
                requirements:
         
     | 
| 
       37 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       38 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       39 
     | 
    
         
            -
                    version: '2.1'
         
     | 
| 
       40 
57 
     | 
    
         
             
                - - ">="
         
     | 
| 
       41 
58 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       42 
     | 
    
         
            -
                    version:  
     | 
| 
      
 59 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       43 
60 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       44 
61 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       45 
62 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       46 
63 
     | 
    
         
             
                requirements:
         
     | 
| 
       47 
     | 
    
         
            -
                - - " 
     | 
| 
      
 64 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 65 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 66 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 67 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 68 
     | 
    
         
            +
              name: marcel
         
     | 
| 
      
 69 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 70 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 71 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       48 
72 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       49 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 73 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 74 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 75 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 76 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 77 
     | 
    
         
            +
                requirements:
         
     | 
| 
       50 
78 
     | 
    
         
             
                - - ">="
         
     | 
| 
       51 
79 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       52 
     | 
    
         
            -
                    version:  
     | 
| 
      
 80 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       53 
81 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       54 
82 
     | 
    
         
             
              name: rspec
         
     | 
| 
       55 
83 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -108,8 +136,6 @@ files: 
     | 
|
| 
       108 
136 
     | 
    
         
             
            - pulp_certguard_client.gemspec
         
     | 
| 
       109 
137 
     | 
    
         
             
            - spec/api/contentguards_rhsm_api_spec.rb
         
     | 
| 
       110 
138 
     | 
    
         
             
            - spec/api/contentguards_x509_api_spec.rb
         
     | 
| 
       111 
     | 
    
         
            -
            - spec/api_client_spec.rb
         
     | 
| 
       112 
     | 
    
         
            -
            - spec/configuration_spec.rb
         
     | 
| 
       113 
139 
     | 
    
         
             
            - spec/models/certguard_rhsm_cert_guard_response_spec.rb
         
     | 
| 
       114 
140 
     | 
    
         
             
            - spec/models/certguard_rhsm_cert_guard_spec.rb
         
     | 
| 
       115 
141 
     | 
    
         
             
            - spec/models/certguard_x509_cert_guard_response_spec.rb
         
     | 
| 
         @@ -131,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       131 
157 
     | 
    
         
             
              requirements:
         
     | 
| 
       132 
158 
     | 
    
         
             
              - - ">="
         
     | 
| 
       133 
159 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       134 
     | 
    
         
            -
                  version: ' 
     | 
| 
      
 160 
     | 
    
         
            +
                  version: '2.7'
         
     | 
| 
       135 
161 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       136 
162 
     | 
    
         
             
              requirements:
         
     | 
| 
       137 
163 
     | 
    
         
             
              - - ">="
         
     | 
| 
         @@ -145,8 +171,6 @@ summary: Pulp 3 API Ruby Gem 
     | 
|
| 
       145 
171 
     | 
    
         
             
            test_files:
         
     | 
| 
       146 
172 
     | 
    
         
             
            - spec/api/contentguards_x509_api_spec.rb
         
     | 
| 
       147 
173 
     | 
    
         
             
            - spec/api/contentguards_rhsm_api_spec.rb
         
     | 
| 
       148 
     | 
    
         
            -
            - spec/api_client_spec.rb
         
     | 
| 
       149 
     | 
    
         
            -
            - spec/configuration_spec.rb
         
     | 
| 
       150 
174 
     | 
    
         
             
            - spec/models/paginatedcertguard_rhsm_cert_guard_response_list_spec.rb
         
     | 
| 
       151 
175 
     | 
    
         
             
            - spec/models/patchedcertguard_rhsm_cert_guard_spec.rb
         
     | 
| 
       152 
176 
     | 
    
         
             
            - spec/models/certguard_x509_cert_guard_spec.rb
         
     | 
    
        data/spec/api_client_spec.rb
    DELETED
    
    | 
         @@ -1,188 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Pulp 3 API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Fetch, Upload, Organize, and Distribute Software Packages
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: v3
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: pulp-list@redhat.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 4.3.1
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            describe PulpCertguardClient::ApiClient do
         
     | 
| 
       16 
     | 
    
         
            -
              context 'initialization' do
         
     | 
| 
       17 
     | 
    
         
            -
                context 'URL stuff' do
         
     | 
| 
       18 
     | 
    
         
            -
                  context 'host' do
         
     | 
| 
       19 
     | 
    
         
            -
                    it 'removes http from host' do
         
     | 
| 
       20 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.host = 'http://example.com' }
         
     | 
| 
       21 
     | 
    
         
            -
                      expect(PulpCertguardClient::Configuration.default.host).to eq('example.com')
         
     | 
| 
       22 
     | 
    
         
            -
                    end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                    it 'removes https from host' do
         
     | 
| 
       25 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.host = 'https://wookiee.com' }
         
     | 
| 
       26 
     | 
    
         
            -
                      expect(PulpCertguardClient::ApiClient.default.config.host).to eq('wookiee.com')
         
     | 
| 
       27 
     | 
    
         
            -
                    end
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                    it 'removes trailing path from host' do
         
     | 
| 
       30 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.host = 'hobo.com/v4' }
         
     | 
| 
       31 
     | 
    
         
            -
                      expect(PulpCertguardClient::Configuration.default.host).to eq('hobo.com')
         
     | 
| 
       32 
     | 
    
         
            -
                    end
         
     | 
| 
       33 
     | 
    
         
            -
                  end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                  context 'base_path' do
         
     | 
| 
       36 
     | 
    
         
            -
                    it "prepends a slash to base_path" do
         
     | 
| 
       37 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.base_path = 'v4/dog' }
         
     | 
| 
       38 
     | 
    
         
            -
                      expect(PulpCertguardClient::Configuration.default.base_path).to eq('/v4/dog')
         
     | 
| 
       39 
     | 
    
         
            -
                    end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                    it "doesn't prepend a slash if one is already there" do
         
     | 
| 
       42 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.base_path = '/v4/dog' }
         
     | 
| 
       43 
     | 
    
         
            -
                      expect(PulpCertguardClient::Configuration.default.base_path).to eq('/v4/dog')
         
     | 
| 
       44 
     | 
    
         
            -
                    end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                    it "ends up as a blank string if nil" do
         
     | 
| 
       47 
     | 
    
         
            -
                      PulpCertguardClient.configure { |c| c.base_path = nil }
         
     | 
| 
       48 
     | 
    
         
            -
                      expect(PulpCertguardClient::Configuration.default.base_path).to eq('')
         
     | 
| 
       49 
     | 
    
         
            -
                    end
         
     | 
| 
       50 
     | 
    
         
            -
                  end
         
     | 
| 
       51 
     | 
    
         
            -
                end
         
     | 
| 
       52 
     | 
    
         
            -
              end
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
              describe '#deserialize' do
         
     | 
| 
       55 
     | 
    
         
            -
                it "handles Array<Integer>" do
         
     | 
| 
       56 
     | 
    
         
            -
                  api_client = PulpCertguardClient::ApiClient.new
         
     | 
| 
       57 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       58 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '[12, 34]')
         
     | 
| 
       59 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Array<Integer>')
         
     | 
| 
       60 
     | 
    
         
            -
                  expect(data).to be_instance_of(Array)
         
     | 
| 
       61 
     | 
    
         
            -
                  expect(data).to eq([12, 34])
         
     | 
| 
       62 
     | 
    
         
            -
                end
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
                it 'handles Array<Array<Integer>>' do
         
     | 
| 
       65 
     | 
    
         
            -
                  api_client = PulpCertguardClient::ApiClient.new
         
     | 
| 
       66 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       67 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '[[12, 34], [56]]')
         
     | 
| 
       68 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Array<Array<Integer>>')
         
     | 
| 
       69 
     | 
    
         
            -
                  expect(data).to be_instance_of(Array)
         
     | 
| 
       70 
     | 
    
         
            -
                  expect(data).to eq([[12, 34], [56]])
         
     | 
| 
       71 
     | 
    
         
            -
                end
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
                it 'handles Hash<String, String>' do
         
     | 
| 
       74 
     | 
    
         
            -
                  api_client = PulpCertguardClient::ApiClient.new
         
     | 
| 
       75 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       76 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '{"message": "Hello"}')
         
     | 
| 
       77 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Hash<String, String>')
         
     | 
| 
       78 
     | 
    
         
            -
                  expect(data).to be_instance_of(Hash)
         
     | 
| 
       79 
     | 
    
         
            -
                  expect(data).to eq(:message => 'Hello')
         
     | 
| 
       80 
     | 
    
         
            -
                end
         
     | 
| 
       81 
     | 
    
         
            -
              end
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
              describe "#object_to_hash" do
         
     | 
| 
       84 
     | 
    
         
            -
                it 'ignores nils and includes empty arrays' do
         
     | 
| 
       85 
     | 
    
         
            -
                  # uncomment below to test object_to_hash for model
         
     | 
| 
       86 
     | 
    
         
            -
                  # api_client = PulpCertguardClient::ApiClient.new
         
     | 
| 
       87 
     | 
    
         
            -
                  # _model = PulpCertguardClient::ModelName.new
         
     | 
| 
       88 
     | 
    
         
            -
                  # update the model attribute below
         
     | 
| 
       89 
     | 
    
         
            -
                  # _model.id = 1
         
     | 
| 
       90 
     | 
    
         
            -
                  # update the expected value (hash) below
         
     | 
| 
       91 
     | 
    
         
            -
                  # expected = {id: 1, name: '', tags: []}
         
     | 
| 
       92 
     | 
    
         
            -
                  # expect(api_client.object_to_hash(_model)).to eq(expected)
         
     | 
| 
       93 
     | 
    
         
            -
                end
         
     | 
| 
       94 
     | 
    
         
            -
              end
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
              describe '#build_collection_param' do
         
     | 
| 
       97 
     | 
    
         
            -
                let(:param) { ['aa', 'bb', 'cc'] }
         
     | 
| 
       98 
     | 
    
         
            -
                let(:api_client) { PulpCertguardClient::ApiClient.new }
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                it 'works for csv' do
         
     | 
| 
       101 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
         
     | 
| 
       102 
     | 
    
         
            -
                end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                it 'works for ssv' do
         
     | 
| 
       105 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
         
     | 
| 
       106 
     | 
    
         
            -
                end
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                it 'works for tsv' do
         
     | 
| 
       109 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
         
     | 
| 
       110 
     | 
    
         
            -
                end
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                it 'works for pipes' do
         
     | 
| 
       113 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
         
     | 
| 
       114 
     | 
    
         
            -
                end
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
                it 'works for multi' do
         
     | 
| 
       117 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
         
     | 
| 
       118 
     | 
    
         
            -
                end
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                it 'fails for invalid collection format' do
         
     | 
| 
       121 
     | 
    
         
            -
                  expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
         
     | 
| 
       122 
     | 
    
         
            -
                end
         
     | 
| 
       123 
     | 
    
         
            -
              end
         
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
              describe '#json_mime?' do
         
     | 
| 
       126 
     | 
    
         
            -
                let(:api_client) { PulpCertguardClient::ApiClient.new }
         
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       129 
     | 
    
         
            -
                  expect(api_client.json_mime?(nil)).to eq false
         
     | 
| 
       130 
     | 
    
         
            -
                  expect(api_client.json_mime?('')).to eq false
         
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/json')).to eq true
         
     | 
| 
       133 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
         
     | 
| 
       134 
     | 
    
         
            -
                  expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/xml')).to eq false
         
     | 
| 
       137 
     | 
    
         
            -
                  expect(api_client.json_mime?('text/plain')).to eq false
         
     | 
| 
       138 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/jsonp')).to eq false
         
     | 
| 
       139 
     | 
    
         
            -
                end
         
     | 
| 
       140 
     | 
    
         
            -
              end
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
              describe '#select_header_accept' do
         
     | 
| 
       143 
     | 
    
         
            -
                let(:api_client) { PulpCertguardClient::ApiClient.new }
         
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       146 
     | 
    
         
            -
                  expect(api_client.select_header_accept(nil)).to be_nil
         
     | 
| 
       147 
     | 
    
         
            -
                  expect(api_client.select_header_accept([])).to be_nil
         
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
         
     | 
| 
       150 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
         
     | 
| 
       151 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
         
     | 
| 
       154 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
         
     | 
| 
       155 
     | 
    
         
            -
                end
         
     | 
| 
       156 
     | 
    
         
            -
              end
         
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
              describe '#select_header_content_type' do
         
     | 
| 
       159 
     | 
    
         
            -
                let(:api_client) { PulpCertguardClient::ApiClient.new }
         
     | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
       161 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       162 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(nil)).to eq('application/json')
         
     | 
| 
       163 
     | 
    
         
            -
                  expect(api_client.select_header_content_type([])).to eq('application/json')
         
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
         
     | 
| 
       166 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
         
     | 
| 
       167 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
         
     | 
| 
       168 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
         
     | 
| 
       169 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
         
     | 
| 
       170 
     | 
    
         
            -
                end
         
     | 
| 
       171 
     | 
    
         
            -
              end
         
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
              describe '#sanitize_filename' do
         
     | 
| 
       174 
     | 
    
         
            -
                let(:api_client) { PulpCertguardClient::ApiClient.new }
         
     | 
| 
       175 
     | 
    
         
            -
             
     | 
| 
       176 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       177 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('sun')).to eq('sun')
         
     | 
| 
       178 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
         
     | 
| 
       179 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
         
     | 
| 
       180 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
         
     | 
| 
       181 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
         
     | 
| 
       182 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
         
     | 
| 
       183 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
         
     | 
| 
       184 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
         
     | 
| 
       185 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
         
     | 
| 
       186 
     | 
    
         
            -
                end
         
     | 
| 
       187 
     | 
    
         
            -
              end
         
     | 
| 
       188 
     | 
    
         
            -
            end
         
     | 
    
        data/spec/configuration_spec.rb
    DELETED
    
    | 
         @@ -1,42 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Pulp 3 API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Fetch, Upload, Organize, and Distribute Software Packages
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: v3
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: pulp-list@redhat.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 4.3.1
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            describe PulpCertguardClient::Configuration do
         
     | 
| 
       16 
     | 
    
         
            -
              let(:config) { PulpCertguardClient::Configuration.default }
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              before(:each) do
         
     | 
| 
       19 
     | 
    
         
            -
                # uncomment below to setup host and base_path
         
     | 
| 
       20 
     | 
    
         
            -
                # require 'URI'
         
     | 
| 
       21 
     | 
    
         
            -
                # uri = URI.parse("http://localhost:24817")
         
     | 
| 
       22 
     | 
    
         
            -
                # PulpCertguardClient.configure do |c|
         
     | 
| 
       23 
     | 
    
         
            -
                #   c.host = uri.host
         
     | 
| 
       24 
     | 
    
         
            -
                #   c.base_path = uri.path
         
     | 
| 
       25 
     | 
    
         
            -
                # end
         
     | 
| 
       26 
     | 
    
         
            -
              end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
              describe '#base_url' do
         
     | 
| 
       29 
     | 
    
         
            -
                it 'should have the default value' do
         
     | 
| 
       30 
     | 
    
         
            -
                  # uncomment below to test default value of the base path
         
     | 
| 
       31 
     | 
    
         
            -
                  # expect(config.base_url).to eq("http://localhost:24817")
         
     | 
| 
       32 
     | 
    
         
            -
                end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                it 'should remove trailing slashes' do
         
     | 
| 
       35 
     | 
    
         
            -
                  [nil, '', '/', '//'].each do |base_path|
         
     | 
| 
       36 
     | 
    
         
            -
                    config.base_path = base_path
         
     | 
| 
       37 
     | 
    
         
            -
                    # uncomment below to test trailing slashes
         
     | 
| 
       38 
     | 
    
         
            -
                    # expect(config.base_url).to eq("http://localhost:24817")
         
     | 
| 
       39 
     | 
    
         
            -
                  end
         
     | 
| 
       40 
     | 
    
         
            -
                end
         
     | 
| 
       41 
     | 
    
         
            -
              end
         
     | 
| 
       42 
     | 
    
         
            -
            end
         
     |