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,227 +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 InlineResponse20010
18
- attr_accessor :count
19
-
20
- attr_accessor :_next
21
-
22
- attr_accessor :previous
23
-
24
- attr_accessor :results
25
-
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'count' => :'count',
31
- :'_next' => :'next',
32
- :'previous' => :'previous',
33
- :'results' => :'results'
34
- }
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.swagger_types
39
- {
40
- :'count' => :'Integer',
41
- :'_next' => :'String',
42
- :'previous' => :'String',
43
- :'results' => :'Array<Worker>'
44
- }
45
- end
46
-
47
- # Initializes the object
48
- # @param [Hash] attributes Model attributes in the form of hash
49
- def initialize(attributes = {})
50
- return unless attributes.is_a?(Hash)
51
-
52
- # convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
-
55
- if attributes.has_key?(:'count')
56
- self.count = attributes[:'count']
57
- end
58
-
59
- if attributes.has_key?(:'next')
60
- self._next = attributes[:'next']
61
- end
62
-
63
- if attributes.has_key?(:'previous')
64
- self.previous = attributes[:'previous']
65
- end
66
-
67
- if attributes.has_key?(:'results')
68
- if (value = attributes[:'results']).is_a?(Array)
69
- self.results = value
70
- end
71
- end
72
-
73
- end
74
-
75
- # Show invalid properties with the reasons. Usually used together with valid?
76
- # @return Array for valid properties with the reasons
77
- def list_invalid_properties
78
- invalid_properties = Array.new
79
- if @count.nil?
80
- invalid_properties.push("invalid value for 'count', count cannot be nil.")
81
- end
82
-
83
- if @results.nil?
84
- invalid_properties.push("invalid value for 'results', results cannot be nil.")
85
- end
86
-
87
- return invalid_properties
88
- end
89
-
90
- # Check to see if the all the properties in the model are valid
91
- # @return true if the model is valid
92
- def valid?
93
- return false if @count.nil?
94
- return false if @results.nil?
95
- return true
96
- end
97
-
98
- # Checks equality by comparing each attribute.
99
- # @param [Object] Object to be compared
100
- def ==(o)
101
- return true if self.equal?(o)
102
- self.class == o.class &&
103
- count == o.count &&
104
- _next == o._next &&
105
- previous == o.previous &&
106
- results == o.results
107
- end
108
-
109
- # @see the `==` method
110
- # @param [Object] Object to be compared
111
- def eql?(o)
112
- self == o
113
- end
114
-
115
- # Calculates hash code according to all attributes.
116
- # @return [Fixnum] Hash code
117
- def hash
118
- [count, _next, previous, results].hash
119
- end
120
-
121
- # Builds the object from hash
122
- # @param [Hash] attributes Model attributes in the form of hash
123
- # @return [Object] Returns the model itself
124
- def build_from_hash(attributes)
125
- return nil unless attributes.is_a?(Hash)
126
- self.class.swagger_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
129
- # is documented as an array but the input is not
130
- if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
132
- end
133
- elsif !attributes[self.class.attribute_map[key]].nil?
134
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
136
- end
137
-
138
- self
139
- end
140
-
141
- # Deserializes the data based on type
142
- # @param string type Data type
143
- # @param string value Value to be deserialized
144
- # @return [Object] Deserialized data
145
- def _deserialize(type, value)
146
- case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
149
- when :Date
150
- Date.parse(value)
151
- when :String
152
- value.to_s
153
- when :Integer
154
- value.to_i
155
- when :Float
156
- value.to_f
157
- when :BOOLEAN
158
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
- true
160
- else
161
- false
162
- end
163
- when :Object
164
- # generic object (usually a Hash), return directly
165
- value
166
- when /\AArray<(?<inner_type>.+)>\z/
167
- inner_type = Regexp.last_match[:inner_type]
168
- value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
- k_type = Regexp.last_match[:k_type]
171
- v_type = Regexp.last_match[:v_type]
172
- {}.tap do |hash|
173
- value.each do |k, v|
174
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
- end
176
- end
177
- else # model
178
- temp_model = KatelloPulpApi.const_get(type).new
179
- temp_model.build_from_hash(value)
180
- end
181
- end
182
-
183
- # Returns the string representation of the object
184
- # @return [String] String presentation of the object
185
- def to_s
186
- to_hash.to_s
187
- end
188
-
189
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
194
-
195
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
199
- self.class.attribute_map.each_pair do |attr, param|
200
- value = self.send(attr)
201
- next if value.nil?
202
- hash[param] = _to_hash(value)
203
- end
204
- hash
205
- end
206
-
207
- # Outputs non-array value in the form of hash
208
- # For object, use to_hash. Otherwise, just return the value
209
- # @param [Object] value Any valid value
210
- # @return [Hash] Returns the value in the form of hash
211
- def _to_hash(value)
212
- if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
214
- elsif value.is_a?(Hash)
215
- {}.tap do |hash|
216
- value.each { |k, v| hash[k] = _to_hash(v) }
217
- end
218
- elsif value.respond_to? :to_hash
219
- value.to_hash
220
- else
221
- value
222
- end
223
- end
224
-
225
- end
226
-
227
- end
@@ -1,227 +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 InlineResponse2002
18
- attr_accessor :count
19
-
20
- attr_accessor :_next
21
-
22
- attr_accessor :previous
23
-
24
- attr_accessor :results
25
-
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'count' => :'count',
31
- :'_next' => :'next',
32
- :'previous' => :'previous',
33
- :'results' => :'results'
34
- }
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.swagger_types
39
- {
40
- :'count' => :'Integer',
41
- :'_next' => :'String',
42
- :'previous' => :'String',
43
- :'results' => :'Array<Distribution>'
44
- }
45
- end
46
-
47
- # Initializes the object
48
- # @param [Hash] attributes Model attributes in the form of hash
49
- def initialize(attributes = {})
50
- return unless attributes.is_a?(Hash)
51
-
52
- # convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
-
55
- if attributes.has_key?(:'count')
56
- self.count = attributes[:'count']
57
- end
58
-
59
- if attributes.has_key?(:'next')
60
- self._next = attributes[:'next']
61
- end
62
-
63
- if attributes.has_key?(:'previous')
64
- self.previous = attributes[:'previous']
65
- end
66
-
67
- if attributes.has_key?(:'results')
68
- if (value = attributes[:'results']).is_a?(Array)
69
- self.results = value
70
- end
71
- end
72
-
73
- end
74
-
75
- # Show invalid properties with the reasons. Usually used together with valid?
76
- # @return Array for valid properties with the reasons
77
- def list_invalid_properties
78
- invalid_properties = Array.new
79
- if @count.nil?
80
- invalid_properties.push("invalid value for 'count', count cannot be nil.")
81
- end
82
-
83
- if @results.nil?
84
- invalid_properties.push("invalid value for 'results', results cannot be nil.")
85
- end
86
-
87
- return invalid_properties
88
- end
89
-
90
- # Check to see if the all the properties in the model are valid
91
- # @return true if the model is valid
92
- def valid?
93
- return false if @count.nil?
94
- return false if @results.nil?
95
- return true
96
- end
97
-
98
- # Checks equality by comparing each attribute.
99
- # @param [Object] Object to be compared
100
- def ==(o)
101
- return true if self.equal?(o)
102
- self.class == o.class &&
103
- count == o.count &&
104
- _next == o._next &&
105
- previous == o.previous &&
106
- results == o.results
107
- end
108
-
109
- # @see the `==` method
110
- # @param [Object] Object to be compared
111
- def eql?(o)
112
- self == o
113
- end
114
-
115
- # Calculates hash code according to all attributes.
116
- # @return [Fixnum] Hash code
117
- def hash
118
- [count, _next, previous, results].hash
119
- end
120
-
121
- # Builds the object from hash
122
- # @param [Hash] attributes Model attributes in the form of hash
123
- # @return [Object] Returns the model itself
124
- def build_from_hash(attributes)
125
- return nil unless attributes.is_a?(Hash)
126
- self.class.swagger_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
129
- # is documented as an array but the input is not
130
- if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
132
- end
133
- elsif !attributes[self.class.attribute_map[key]].nil?
134
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
136
- end
137
-
138
- self
139
- end
140
-
141
- # Deserializes the data based on type
142
- # @param string type Data type
143
- # @param string value Value to be deserialized
144
- # @return [Object] Deserialized data
145
- def _deserialize(type, value)
146
- case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
149
- when :Date
150
- Date.parse(value)
151
- when :String
152
- value.to_s
153
- when :Integer
154
- value.to_i
155
- when :Float
156
- value.to_f
157
- when :BOOLEAN
158
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
- true
160
- else
161
- false
162
- end
163
- when :Object
164
- # generic object (usually a Hash), return directly
165
- value
166
- when /\AArray<(?<inner_type>.+)>\z/
167
- inner_type = Regexp.last_match[:inner_type]
168
- value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
- k_type = Regexp.last_match[:k_type]
171
- v_type = Regexp.last_match[:v_type]
172
- {}.tap do |hash|
173
- value.each do |k, v|
174
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
- end
176
- end
177
- else # model
178
- temp_model = KatelloPulpApi.const_get(type).new
179
- temp_model.build_from_hash(value)
180
- end
181
- end
182
-
183
- # Returns the string representation of the object
184
- # @return [String] String presentation of the object
185
- def to_s
186
- to_hash.to_s
187
- end
188
-
189
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
194
-
195
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
199
- self.class.attribute_map.each_pair do |attr, param|
200
- value = self.send(attr)
201
- next if value.nil?
202
- hash[param] = _to_hash(value)
203
- end
204
- hash
205
- end
206
-
207
- # Outputs non-array value in the form of hash
208
- # For object, use to_hash. Otherwise, just return the value
209
- # @param [Object] value Any valid value
210
- # @return [Hash] Returns the value in the form of hash
211
- def _to_hash(value)
212
- if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
214
- elsif value.is_a?(Hash)
215
- {}.tap do |hash|
216
- value.each { |k, v| hash[k] = _to_hash(v) }
217
- end
218
- elsif value.respond_to? :to_hash
219
- value.to_hash
220
- else
221
- value
222
- end
223
- end
224
-
225
- end
226
-
227
- end