zest 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/zest/version.rb +1 -1
  4. data/spec/api/pulp_api_spec.rb +3 -3
  5. data/spec/api_client_spec.rb +29 -29
  6. data/spec/configuration_spec.rb +3 -3
  7. data/spec/models/artifact_spec.rb +3 -3
  8. data/spec/models/async_operation_response_spec.rb +3 -3
  9. data/spec/models/distribution_spec.rb +3 -3
  10. data/spec/models/file_content_spec.rb +3 -3
  11. data/spec/models/file_publisher_spec.rb +3 -3
  12. data/spec/models/file_remote_spec.rb +3 -3
  13. data/spec/models/inline_response_200_10_spec.rb +3 -3
  14. data/spec/models/inline_response_200_1_spec.rb +3 -3
  15. data/spec/models/inline_response_200_2_spec.rb +3 -3
  16. data/spec/models/inline_response_200_3_spec.rb +3 -3
  17. data/spec/models/inline_response_200_4_spec.rb +3 -3
  18. data/spec/models/inline_response_200_5_spec.rb +3 -3
  19. data/spec/models/inline_response_200_6_spec.rb +3 -3
  20. data/spec/models/inline_response_200_7_spec.rb +3 -3
  21. data/spec/models/inline_response_200_8_spec.rb +3 -3
  22. data/spec/models/inline_response_200_9_spec.rb +3 -3
  23. data/spec/models/inline_response_200_spec.rb +3 -3
  24. data/spec/models/progress_report_spec.rb +3 -3
  25. data/spec/models/publication_spec.rb +3 -3
  26. data/spec/models/repository_publish_url_spec.rb +3 -3
  27. data/spec/models/repository_spec.rb +3 -3
  28. data/spec/models/repository_sync_url_spec.rb +3 -3
  29. data/spec/models/repository_version_create_spec.rb +3 -3
  30. data/spec/models/repository_version_spec.rb +3 -3
  31. data/spec/models/task_spec.rb +3 -3
  32. data/spec/models/user_spec.rb +3 -3
  33. data/spec/models/worker_spec.rb +3 -3
  34. data/spec/spec_helper.rb +1 -1
  35. data/zest.gemspec +3 -4
  36. metadata +6 -44
  37. data/api.json +0 -1
  38. data/config.json +0 -6
  39. data/katello_pulp_api-0.0.1.gem +0 -0
  40. data/katello_pulp_api.gemspec +0 -46
  41. data/lib/katello_pulp_api.rb +0 -67
  42. data/lib/katello_pulp_api/api/pulp_api.rb +0 -3277
  43. data/lib/katello_pulp_api/api_client.rb +0 -389
  44. data/lib/katello_pulp_api/api_error.rb +0 -38
  45. data/lib/katello_pulp_api/configuration.rb +0 -209
  46. data/lib/katello_pulp_api/models/artifact.rb +0 -278
  47. data/lib/katello_pulp_api/models/async_operation_response.rb +0 -194
  48. data/lib/katello_pulp_api/models/distribution.rb +0 -350
  49. data/lib/katello_pulp_api/models/file_content.rb +0 -272
  50. data/lib/katello_pulp_api/models/file_publisher.rb +0 -306
  51. data/lib/katello_pulp_api/models/file_remote.rb +0 -452
  52. data/lib/katello_pulp_api/models/inline_response_200.rb +0 -227
  53. data/lib/katello_pulp_api/models/inline_response_200_1.rb +0 -227
  54. data/lib/katello_pulp_api/models/inline_response_200_10.rb +0 -227
  55. data/lib/katello_pulp_api/models/inline_response_200_2.rb +0 -227
  56. data/lib/katello_pulp_api/models/inline_response_200_3.rb +0 -227
  57. data/lib/katello_pulp_api/models/inline_response_200_4.rb +0 -227
  58. data/lib/katello_pulp_api/models/inline_response_200_5.rb +0 -227
  59. data/lib/katello_pulp_api/models/inline_response_200_6.rb +0 -227
  60. data/lib/katello_pulp_api/models/inline_response_200_7.rb +0 -227
  61. data/lib/katello_pulp_api/models/inline_response_200_8.rb +0 -227
  62. data/lib/katello_pulp_api/models/inline_response_200_9.rb +0 -227
  63. data/lib/katello_pulp_api/models/progress_report.rb +0 -271
  64. data/lib/katello_pulp_api/models/publication.rb +0 -249
  65. data/lib/katello_pulp_api/models/repository.rb +0 -260
  66. data/lib/katello_pulp_api/models/repository_publish_url.rb +0 -199
  67. data/lib/katello_pulp_api/models/repository_sync_url.rb +0 -206
  68. data/lib/katello_pulp_api/models/repository_version.rb +0 -277
  69. data/lib/katello_pulp_api/models/repository_version_create.rb +0 -223
  70. data/lib/katello_pulp_api/models/task.rb +0 -363
  71. data/lib/katello_pulp_api/models/user.rb +0 -284
  72. data/lib/katello_pulp_api/models/worker.rb +0 -254
  73. data/lib/katello_pulp_api/version.rb +0 -15
@@ -1,249 +0,0 @@
1
- =begin
2
- #Pulp3 API
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: v3
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module KatelloPulpApi
16
-
17
- class Publication
18
- attr_accessor :_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :_created
22
-
23
- # The publication is a pass-through for the repository version.
24
- attr_accessor :pass_through
25
-
26
- # The publisher that created this publication.
27
- attr_accessor :publisher
28
-
29
- # This publication is currently being served asdefined by these distributions.
30
- attr_accessor :distributions
31
-
32
- attr_accessor :repository_version
33
-
34
-
35
- # Attribute mapping from ruby-style variable name to JSON key.
36
- def self.attribute_map
37
- {
38
- :'_href' => :'_href',
39
- :'_created' => :'_created',
40
- :'pass_through' => :'pass_through',
41
- :'publisher' => :'publisher',
42
- :'distributions' => :'distributions',
43
- :'repository_version' => :'repository_version'
44
- }
45
- end
46
-
47
- # Attribute type mapping.
48
- def self.swagger_types
49
- {
50
- :'_href' => :'String',
51
- :'_created' => :'DateTime',
52
- :'pass_through' => :'BOOLEAN',
53
- :'publisher' => :'String',
54
- :'distributions' => :'Array<String>',
55
- :'repository_version' => :'String'
56
- }
57
- end
58
-
59
- # Initializes the object
60
- # @param [Hash] attributes Model attributes in the form of hash
61
- def initialize(attributes = {})
62
- return unless attributes.is_a?(Hash)
63
-
64
- # convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
-
67
- if attributes.has_key?(:'_href')
68
- self._href = attributes[:'_href']
69
- end
70
-
71
- if attributes.has_key?(:'_created')
72
- self._created = attributes[:'_created']
73
- end
74
-
75
- if attributes.has_key?(:'pass_through')
76
- self.pass_through = attributes[:'pass_through']
77
- end
78
-
79
- if attributes.has_key?(:'publisher')
80
- self.publisher = attributes[:'publisher']
81
- end
82
-
83
- if attributes.has_key?(:'distributions')
84
- if (value = attributes[:'distributions']).is_a?(Array)
85
- self.distributions = value
86
- end
87
- end
88
-
89
- if attributes.has_key?(:'repository_version')
90
- self.repository_version = attributes[:'repository_version']
91
- end
92
-
93
- end
94
-
95
- # Show invalid properties with the reasons. Usually used together with valid?
96
- # @return Array for valid properties with the reasons
97
- def list_invalid_properties
98
- invalid_properties = Array.new
99
- if @pass_through.nil?
100
- invalid_properties.push("invalid value for 'pass_through', pass_through cannot be nil.")
101
- end
102
-
103
- if @publisher.nil?
104
- invalid_properties.push("invalid value for 'publisher', publisher cannot be nil.")
105
- end
106
-
107
- return invalid_properties
108
- end
109
-
110
- # Check to see if the all the properties in the model are valid
111
- # @return true if the model is valid
112
- def valid?
113
- return false if @pass_through.nil?
114
- return false if @publisher.nil?
115
- return true
116
- end
117
-
118
- # Checks equality by comparing each attribute.
119
- # @param [Object] Object to be compared
120
- def ==(o)
121
- return true if self.equal?(o)
122
- self.class == o.class &&
123
- _href == o._href &&
124
- _created == o._created &&
125
- pass_through == o.pass_through &&
126
- publisher == o.publisher &&
127
- distributions == o.distributions &&
128
- repository_version == o.repository_version
129
- end
130
-
131
- # @see the `==` method
132
- # @param [Object] Object to be compared
133
- def eql?(o)
134
- self == o
135
- end
136
-
137
- # Calculates hash code according to all attributes.
138
- # @return [Fixnum] Hash code
139
- def hash
140
- [_href, _created, pass_through, publisher, distributions, repository_version].hash
141
- end
142
-
143
- # Builds the object from hash
144
- # @param [Hash] attributes Model attributes in the form of hash
145
- # @return [Object] Returns the model itself
146
- def build_from_hash(attributes)
147
- return nil unless attributes.is_a?(Hash)
148
- self.class.swagger_types.each_pair do |key, type|
149
- if type =~ /\AArray<(.*)>/i
150
- # check to ensure the input is an array given that the the attribute
151
- # is documented as an array but the input is not
152
- if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
154
- end
155
- elsif !attributes[self.class.attribute_map[key]].nil?
156
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
- end # or else data not found in attributes(hash), not an issue as the data can be optional
158
- end
159
-
160
- self
161
- end
162
-
163
- # Deserializes the data based on type
164
- # @param string type Data type
165
- # @param string value Value to be deserialized
166
- # @return [Object] Deserialized data
167
- def _deserialize(type, value)
168
- case type.to_sym
169
- when :DateTime
170
- DateTime.parse(value)
171
- when :Date
172
- Date.parse(value)
173
- when :String
174
- value.to_s
175
- when :Integer
176
- value.to_i
177
- when :Float
178
- value.to_f
179
- when :BOOLEAN
180
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
- true
182
- else
183
- false
184
- end
185
- when :Object
186
- # generic object (usually a Hash), return directly
187
- value
188
- when /\AArray<(?<inner_type>.+)>\z/
189
- inner_type = Regexp.last_match[:inner_type]
190
- value.map { |v| _deserialize(inner_type, v) }
191
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
- k_type = Regexp.last_match[:k_type]
193
- v_type = Regexp.last_match[:v_type]
194
- {}.tap do |hash|
195
- value.each do |k, v|
196
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
- end
198
- end
199
- else # model
200
- temp_model = KatelloPulpApi.const_get(type).new
201
- temp_model.build_from_hash(value)
202
- end
203
- end
204
-
205
- # Returns the string representation of the object
206
- # @return [String] String presentation of the object
207
- def to_s
208
- to_hash.to_s
209
- end
210
-
211
- # to_body is an alias to to_hash (backward compatibility)
212
- # @return [Hash] Returns the object in the form of hash
213
- def to_body
214
- to_hash
215
- end
216
-
217
- # Returns the object in the form of hash
218
- # @return [Hash] Returns the object in the form of hash
219
- def to_hash
220
- hash = {}
221
- self.class.attribute_map.each_pair do |attr, param|
222
- value = self.send(attr)
223
- next if value.nil?
224
- hash[param] = _to_hash(value)
225
- end
226
- hash
227
- end
228
-
229
- # Outputs non-array value in the form of hash
230
- # For object, use to_hash. Otherwise, just return the value
231
- # @param [Object] value Any valid value
232
- # @return [Hash] Returns the value in the form of hash
233
- def _to_hash(value)
234
- if value.is_a?(Array)
235
- value.compact.map{ |v| _to_hash(v) }
236
- elsif value.is_a?(Hash)
237
- {}.tap do |hash|
238
- value.each { |k, v| hash[k] = _to_hash(v) }
239
- end
240
- elsif value.respond_to? :to_hash
241
- value.to_hash
242
- else
243
- value
244
- end
245
- end
246
-
247
- end
248
-
249
- end
@@ -1,260 +0,0 @@
1
- =begin
2
- #Pulp3 API
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: v3
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module KatelloPulpApi
16
-
17
- class Repository
18
- attr_accessor :_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :_created
22
-
23
- attr_accessor :_versions_href
24
-
25
- attr_accessor :_latest_version_href
26
-
27
- # A unique name for this repository.
28
- attr_accessor :name
29
-
30
- # An optional description.
31
- attr_accessor :description
32
-
33
-
34
- # Attribute mapping from ruby-style variable name to JSON key.
35
- def self.attribute_map
36
- {
37
- :'_href' => :'_href',
38
- :'_created' => :'_created',
39
- :'_versions_href' => :'_versions_href',
40
- :'_latest_version_href' => :'_latest_version_href',
41
- :'name' => :'name',
42
- :'description' => :'description'
43
- }
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.swagger_types
48
- {
49
- :'_href' => :'String',
50
- :'_created' => :'DateTime',
51
- :'_versions_href' => :'String',
52
- :'_latest_version_href' => :'String',
53
- :'name' => :'String',
54
- :'description' => :'String'
55
- }
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- return unless attributes.is_a?(Hash)
62
-
63
- # convert string to symbol for hash key
64
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
65
-
66
- if attributes.has_key?(:'_href')
67
- self._href = attributes[:'_href']
68
- end
69
-
70
- if attributes.has_key?(:'_created')
71
- self._created = attributes[:'_created']
72
- end
73
-
74
- if attributes.has_key?(:'_versions_href')
75
- self._versions_href = attributes[:'_versions_href']
76
- end
77
-
78
- if attributes.has_key?(:'_latest_version_href')
79
- self._latest_version_href = attributes[:'_latest_version_href']
80
- end
81
-
82
- if attributes.has_key?(:'name')
83
- self.name = attributes[:'name']
84
- end
85
-
86
- if attributes.has_key?(:'description')
87
- self.description = attributes[:'description']
88
- end
89
-
90
- end
91
-
92
- # Show invalid properties with the reasons. Usually used together with valid?
93
- # @return Array for valid properties with the reasons
94
- def list_invalid_properties
95
- invalid_properties = Array.new
96
- if @name.nil?
97
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
98
- end
99
-
100
- if @name.to_s.length < 1
101
- invalid_properties.push("invalid value for 'name', the character length must be great than or equal to 1.")
102
- end
103
-
104
- return invalid_properties
105
- end
106
-
107
- # Check to see if the all the properties in the model are valid
108
- # @return true if the model is valid
109
- def valid?
110
- return false if @name.nil?
111
- return false if @name.to_s.length < 1
112
- return true
113
- end
114
-
115
- # Custom attribute writer method with validation
116
- # @param [Object] name Value to be assigned
117
- def name=(name)
118
- if name.nil?
119
- fail ArgumentError, "name cannot be nil"
120
- end
121
-
122
- if name.to_s.length < 1
123
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to 1."
124
- end
125
-
126
- @name = name
127
- end
128
-
129
- # Checks equality by comparing each attribute.
130
- # @param [Object] Object to be compared
131
- def ==(o)
132
- return true if self.equal?(o)
133
- self.class == o.class &&
134
- _href == o._href &&
135
- _created == o._created &&
136
- _versions_href == o._versions_href &&
137
- _latest_version_href == o._latest_version_href &&
138
- name == o.name &&
139
- description == o.description
140
- end
141
-
142
- # @see the `==` method
143
- # @param [Object] Object to be compared
144
- def eql?(o)
145
- self == o
146
- end
147
-
148
- # Calculates hash code according to all attributes.
149
- # @return [Fixnum] Hash code
150
- def hash
151
- [_href, _created, _versions_href, _latest_version_href, name, description].hash
152
- end
153
-
154
- # Builds the object from hash
155
- # @param [Hash] attributes Model attributes in the form of hash
156
- # @return [Object] Returns the model itself
157
- def build_from_hash(attributes)
158
- return nil unless attributes.is_a?(Hash)
159
- self.class.swagger_types.each_pair do |key, type|
160
- if type =~ /\AArray<(.*)>/i
161
- # check to ensure the input is an array given that the the attribute
162
- # is documented as an array but the input is not
163
- if attributes[self.class.attribute_map[key]].is_a?(Array)
164
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
165
- end
166
- elsif !attributes[self.class.attribute_map[key]].nil?
167
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
- end # or else data not found in attributes(hash), not an issue as the data can be optional
169
- end
170
-
171
- self
172
- end
173
-
174
- # Deserializes the data based on type
175
- # @param string type Data type
176
- # @param string value Value to be deserialized
177
- # @return [Object] Deserialized data
178
- def _deserialize(type, value)
179
- case type.to_sym
180
- when :DateTime
181
- DateTime.parse(value)
182
- when :Date
183
- Date.parse(value)
184
- when :String
185
- value.to_s
186
- when :Integer
187
- value.to_i
188
- when :Float
189
- value.to_f
190
- when :BOOLEAN
191
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
- true
193
- else
194
- false
195
- end
196
- when :Object
197
- # generic object (usually a Hash), return directly
198
- value
199
- when /\AArray<(?<inner_type>.+)>\z/
200
- inner_type = Regexp.last_match[:inner_type]
201
- value.map { |v| _deserialize(inner_type, v) }
202
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
- k_type = Regexp.last_match[:k_type]
204
- v_type = Regexp.last_match[:v_type]
205
- {}.tap do |hash|
206
- value.each do |k, v|
207
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
- end
209
- end
210
- else # model
211
- temp_model = KatelloPulpApi.const_get(type).new
212
- temp_model.build_from_hash(value)
213
- end
214
- end
215
-
216
- # Returns the string representation of the object
217
- # @return [String] String presentation of the object
218
- def to_s
219
- to_hash.to_s
220
- end
221
-
222
- # to_body is an alias to to_hash (backward compatibility)
223
- # @return [Hash] Returns the object in the form of hash
224
- def to_body
225
- to_hash
226
- end
227
-
228
- # Returns the object in the form of hash
229
- # @return [Hash] Returns the object in the form of hash
230
- def to_hash
231
- hash = {}
232
- self.class.attribute_map.each_pair do |attr, param|
233
- value = self.send(attr)
234
- next if value.nil?
235
- hash[param] = _to_hash(value)
236
- end
237
- hash
238
- end
239
-
240
- # Outputs non-array value in the form of hash
241
- # For object, use to_hash. Otherwise, just return the value
242
- # @param [Object] value Any valid value
243
- # @return [Hash] Returns the value in the form of hash
244
- def _to_hash(value)
245
- if value.is_a?(Array)
246
- value.compact.map{ |v| _to_hash(v) }
247
- elsif value.is_a?(Hash)
248
- {}.tap do |hash|
249
- value.each { |k, v| hash[k] = _to_hash(v) }
250
- end
251
- elsif value.respond_to? :to_hash
252
- value.to_hash
253
- else
254
- value
255
- end
256
- end
257
-
258
- end
259
-
260
- end