pulp_gem_client 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -8
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContentGemApi.md +118 -66
  5. data/docs/ContentSummaryResponse.md +12 -11
  6. data/docs/DistributionsGemApi.md +388 -183
  7. data/docs/GemGemContentResponse.md +32 -29
  8. data/docs/GemGemDistribution.md +22 -21
  9. data/docs/GemGemDistributionResponse.md +34 -29
  10. data/docs/GemGemPublication.md +10 -9
  11. data/docs/GemGemPublicationResponse.md +18 -15
  12. data/docs/GemGemRemote.md +54 -53
  13. data/docs/GemGemRemoteResponse.md +54 -51
  14. data/docs/GemGemRemoteResponseHiddenFieldsInner.md +20 -0
  15. data/docs/GemGemRepository.md +16 -15
  16. data/docs/GemGemRepositoryResponse.md +28 -25
  17. data/docs/MyPermissionsResponse.md +8 -7
  18. data/docs/NestedRole.md +12 -11
  19. data/docs/NestedRoleResponse.md +12 -11
  20. data/docs/ObjectRolesResponse.md +8 -7
  21. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  22. data/docs/PaginatedgemGemContentResponseList.md +14 -13
  23. data/docs/PaginatedgemGemDistributionResponseList.md +14 -13
  24. data/docs/PaginatedgemGemPublicationResponseList.md +14 -13
  25. data/docs/PaginatedgemGemRemoteResponseList.md +14 -13
  26. data/docs/PaginatedgemGemRepositoryResponseList.md +14 -13
  27. data/docs/PatchedgemGemDistribution.md +22 -21
  28. data/docs/PatchedgemGemRemote.md +54 -53
  29. data/docs/PatchedgemGemRepository.md +16 -15
  30. data/docs/PolicyEnum.md +4 -5
  31. data/docs/PublicationsGemApi.md +271 -132
  32. data/docs/RemotesGemApi.md +392 -185
  33. data/docs/Repair.md +8 -7
  34. data/docs/RepositoriesGemApi.md +449 -210
  35. data/docs/RepositoriesGemVersionsApi.md +155 -83
  36. data/docs/RepositoryAddRemoveContent.md +12 -11
  37. data/docs/RepositorySyncURL.md +10 -9
  38. data/docs/RepositoryVersionResponse.md +22 -19
  39. data/docs/SetLabel.md +10 -9
  40. data/docs/SetLabelResponse.md +10 -9
  41. data/docs/UnsetLabel.md +8 -7
  42. data/docs/UnsetLabelResponse.md +10 -9
  43. data/lib/pulp_gem_client/api/content_gem_api.rb +31 -22
  44. data/lib/pulp_gem_client/api/distributions_gem_api.rb +94 -58
  45. data/lib/pulp_gem_client/api/publications_gem_api.rb +81 -58
  46. data/lib/pulp_gem_client/api/remotes_gem_api.rb +109 -70
  47. data/lib/pulp_gem_client/api/repositories_gem_api.rb +116 -72
  48. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +50 -37
  49. data/lib/pulp_gem_client/api_client.rb +137 -102
  50. data/lib/pulp_gem_client/api_error.rb +2 -1
  51. data/lib/pulp_gem_client/configuration.rb +162 -21
  52. data/lib/pulp_gem_client/models/async_operation_response.rb +32 -22
  53. data/lib/pulp_gem_client/models/content_summary_response.rb +36 -22
  54. data/lib/pulp_gem_client/models/gem_gem_content_response.rb +45 -25
  55. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +34 -22
  56. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +57 -25
  57. data/lib/pulp_gem_client/models/gem_gem_publication.rb +30 -22
  58. data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +43 -25
  59. data/lib/pulp_gem_client/models/gem_gem_remote.rb +56 -22
  60. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +70 -26
  61. data/lib/pulp_gem_client/models/{gem_gem_remote_response_hidden_fields.rb → gem_gem_remote_response_hidden_fields_inner.rb} +37 -25
  62. data/lib/pulp_gem_client/models/gem_gem_repository.rb +32 -22
  63. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +45 -25
  64. data/lib/pulp_gem_client/models/my_permissions_response.rb +32 -22
  65. data/lib/pulp_gem_client/models/nested_role.rb +32 -22
  66. data/lib/pulp_gem_client/models/nested_role_response.rb +32 -22
  67. data/lib/pulp_gem_client/models/object_roles_response.rb +32 -22
  68. data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +34 -22
  69. data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +34 -22
  70. data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +34 -22
  71. data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +34 -22
  72. data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +34 -22
  73. data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +34 -22
  74. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +40 -24
  75. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +62 -24
  76. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +35 -23
  77. data/lib/pulp_gem_client/models/policy_enum.rb +8 -4
  78. data/lib/pulp_gem_client/models/repair.rb +30 -22
  79. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +31 -23
  80. data/lib/pulp_gem_client/models/repository_sync_url.rb +30 -22
  81. data/lib/pulp_gem_client/models/repository_version_response.rb +44 -26
  82. data/lib/pulp_gem_client/models/set_label.rb +34 -22
  83. data/lib/pulp_gem_client/models/set_label_response.rb +34 -22
  84. data/lib/pulp_gem_client/models/unset_label.rb +32 -22
  85. data/lib/pulp_gem_client/models/unset_label_response.rb +32 -22
  86. data/lib/pulp_gem_client/version.rb +2 -2
  87. data/lib/pulp_gem_client.rb +2 -3
  88. data/pulp_gem_client.gemspec +9 -6
  89. data/spec/api/content_gem_api_spec.rb +9 -8
  90. data/spec/api/distributions_gem_api_spec.rb +15 -14
  91. data/spec/api/publications_gem_api_spec.rb +22 -20
  92. data/spec/api/remotes_gem_api_spec.rb +22 -20
  93. data/spec/api/repositories_gem_api_spec.rb +19 -18
  94. data/spec/api/repositories_gem_versions_api_spec.rb +16 -14
  95. data/spec/models/async_operation_response_spec.rb +7 -12
  96. data/spec/models/content_summary_response_spec.rb +9 -14
  97. data/spec/models/gem_gem_content_response_spec.rb +24 -23
  98. data/spec/models/gem_gem_distribution_response_spec.rb +30 -23
  99. data/spec/models/gem_gem_distribution_spec.rb +14 -19
  100. data/spec/models/gem_gem_publication_response_spec.rb +17 -16
  101. data/spec/models/gem_gem_publication_spec.rb +8 -13
  102. data/spec/models/{gem_gem_remote_response_hidden_fields_spec.rb → gem_gem_remote_response_hidden_fields_inner_spec.rb} +11 -16
  103. data/spec/models/gem_gem_remote_response_spec.rb +35 -34
  104. data/spec/models/gem_gem_remote_spec.rb +30 -35
  105. data/spec/models/gem_gem_repository_response_spec.rb +22 -21
  106. data/spec/models/gem_gem_repository_spec.rb +11 -16
  107. data/spec/models/my_permissions_response_spec.rb +7 -12
  108. data/spec/models/nested_role_response_spec.rb +9 -14
  109. data/spec/models/nested_role_spec.rb +9 -14
  110. data/spec/models/object_roles_response_spec.rb +7 -12
  111. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  112. data/spec/models/paginatedgem_gem_content_response_list_spec.rb +10 -15
  113. data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +10 -15
  114. data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +10 -15
  115. data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +10 -15
  116. data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +10 -15
  117. data/spec/models/patchedgem_gem_distribution_spec.rb +14 -19
  118. data/spec/models/patchedgem_gem_remote_spec.rb +30 -35
  119. data/spec/models/patchedgem_gem_repository_spec.rb +11 -16
  120. data/spec/models/policy_enum_spec.rb +6 -11
  121. data/spec/models/repair_spec.rb +7 -12
  122. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  123. data/spec/models/repository_sync_url_spec.rb +8 -13
  124. data/spec/models/repository_version_response_spec.rb +19 -18
  125. data/spec/models/set_label_response_spec.rb +8 -13
  126. data/spec/models/set_label_spec.rb +8 -13
  127. data/spec/models/unset_label_response_spec.rb +8 -13
  128. data/spec/models/unset_label_spec.rb +7 -12
  129. data/spec/spec_helper.rb +1 -1
  130. metadata +80 -60
  131. data/docs/GemGemContent.md +0 -21
  132. data/docs/GemGemRemoteResponseHiddenFields.md +0 -19
  133. data/lib/pulp_gem_client/models/gem_gem_content.rb +0 -228
  134. data/spec/api_client_spec.rb +0 -188
  135. data/spec/configuration_spec.rb +0 -42
  136. data/spec/models/gem_gem_content_spec.rb +0 -53
@@ -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 PulpGemClient::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- PulpGemClient.configure { |c| c.host = 'http://example.com' }
21
- expect(PulpGemClient::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- PulpGemClient.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(PulpGemClient::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- PulpGemClient.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(PulpGemClient::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
- PulpGemClient.configure { |c| c.base_path = 'v4/dog' }
38
- expect(PulpGemClient::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
- PulpGemClient.configure { |c| c.base_path = '/v4/dog' }
43
- expect(PulpGemClient::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- PulpGemClient.configure { |c| c.base_path = nil }
48
- expect(PulpGemClient::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 = PulpGemClient::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 = PulpGemClient::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 = PulpGemClient::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 = PulpGemClient::ApiClient.new
87
- # _model = PulpGemClient::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) { PulpGemClient::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) { PulpGemClient::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) { PulpGemClient::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) { PulpGemClient::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) { PulpGemClient::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
@@ -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 PulpGemClient::Configuration do
16
- let(:config) { PulpGemClient::Configuration.default }
17
-
18
- before(:each) do
19
- # uncomment below to setup host and base_path
20
- # require 'URI'
21
- # uri = URI.parse("http://pulp")
22
- # PulpGemClient.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://pulp")
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://pulp")
39
- end
40
- end
41
- end
42
- end
@@ -1,53 +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
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpGemClient::GemGemContent
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'GemGemContent' do
21
- before do
22
- # run before each test
23
- @instance = PulpGemClient::GemGemContent.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of GemGemContent' do
31
- it 'should create an instance of GemGemContent' do
32
- expect(@instance).to be_instance_of(PulpGemClient::GemGemContent)
33
- end
34
- end
35
- describe 'test attribute "repository"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "artifact"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "file"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- end