runcible 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3e4335860cb7571868453dcaa69af8802809594
4
- data.tar.gz: 6f79b035df3735a718b06dcc9c4c604fc0eebe8a
3
+ metadata.gz: 32c1e5f5bc23de91c10c59331deb1c68e705b5b6
4
+ data.tar.gz: 0c86db9abe10dd8389f383a85a1e1abf09e99719
5
5
  SHA512:
6
- metadata.gz: c9aaee0edf5378d33db02951dc212396127067fd40bb83d5fcee40b149bf7630227d820c446f8a87ac90ad568c23af8f7e29316a743ddb4b9b4dda561d975a7b
7
- data.tar.gz: a90259e9c86e423c03241a60476eb122fbd71606d42edde3ed593d06ba8a4541f751f743dafd3d2cfb2ca489070b3ef58be9b83ddb1b1b6bea59e52f9cafa5eb
6
+ metadata.gz: 25d467a8e634c31665228fdee5d8238703953b72a2e2d2974492afce856643fa954e6b562002284333f8a8b989626bf066c9a5557a44c20e2f15b553c92fcbcb
7
+ data.tar.gz: dff8d30039657c4e73913643b998bd2ac727acdb6965e0762ed21168fd9ac3cc607fdada94fefcc6872f9071426d94ae6408a16688098b8acfdcc7cda4211b6e
data/Gemfile CHANGED
@@ -12,7 +12,3 @@ group :test do
12
12
  gem 'mocha', "~> 0.14.0"
13
13
  gem 'rubocop', "0.24.1"
14
14
  end
15
-
16
- group :debug do
17
- gem 'debugger' if RUBY_VERSION == "1.9.3"
18
- end
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Exposing Pulp's juiciest parts. http://www.pulpproject.org/
6
6
 
7
- Latest Live Tested Version: **pulp-server-2.6.2-1.el7.noarch**
7
+ Latest Live Tested Version: **pulp-server-2.8.0-0.4.beta.el7.noarch**
8
8
 
9
9
  Current stable Runcible: https://github.com/Katello/runcible/tree/0.3
10
10
 
@@ -43,15 +43,22 @@ module Runcible
43
43
  client_options[:verify_ssl] = clone_config[:verify_ssl] unless clone_config[:verify_ssl].nil?
44
44
 
45
45
  if clone_config[:oauth]
46
- headers = add_oauth_header(method, path, headers) if clone_config[:oauth]
46
+ headers = add_oauth_header(method, path, headers)
47
47
  headers['pulp-user'] = clone_config[:user]
48
- client = RestClient::Resource.new(clone_config[:url], client_options)
48
+ elsif clone_config[:cert_auth]
49
+ if !clone_config[:cert_auth][:ssl_client_cert] || !clone_config[:cert_auth][:ssl_client_key]
50
+ fail Runcible::ConfigurationUndefinedError, "Missing SSL certificate or key configuration."
51
+ end
52
+ client_options[:ssl_client_cert] = clone_config[:cert_auth][:ssl_client_cert]
53
+ client_options[:ssl_client_key] = clone_config[:cert_auth][:ssl_client_key]
49
54
  else
50
55
  client_options[:user] = clone_config[:user]
51
56
  client_options[:password] = config[:http_auth][:password]
52
- client = RestClient::Resource.new(clone_config[:url], client_options)
53
57
  end
54
58
 
59
+ client_options[:ca_file] = config[:ca_cert_file] unless config[:ca_cert_file].nil?
60
+ client = RestClient::Resource.new(clone_config[:url], client_options)
61
+
55
62
  args = [method]
56
63
  args << generate_payload(options) if [:post, :put].include?(method)
57
64
  args << headers
@@ -164,7 +171,6 @@ module Runcible
164
171
  :authorize_path => '',
165
172
  :access_token_path => '' }
166
173
 
167
- default_options[:ca_file] = config[:ca_cert_file] unless config[:ca_cert_file].nil?
168
174
  consumer = OAuth::Consumer.new(config[:oauth][:oauth_key], config[:oauth][:oauth_secret], default_options)
169
175
 
170
176
  method_to_http_request = { :get => Net::HTTP::Get,
@@ -0,0 +1,9 @@
1
+ module Runcible
2
+ module Extensions
3
+ class DockerManifest < Runcible::Extensions::Unit
4
+ def self.content_type
5
+ 'docker_manifest'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -240,6 +240,26 @@ module Runcible
240
240
  unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
241
241
  end
242
242
 
243
+ # Retrieves the docker manifest IDs for a single repository
244
+ #
245
+ # @param [String] id the ID of the repository
246
+ # @return [RestClient::Response] the set of repository docker manifest IDs
247
+ def docker_manifest_ids(id)
248
+ criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type],
249
+ :fields => {:unit => [], :association => ['unit_id']}}
250
+
251
+ unit_search(id, criteria).map { |i| i['unit_id'] }
252
+ end
253
+
254
+ # Retrieves the docker manifests for a single repository
255
+ #
256
+ # @param [String] id the ID of the repository
257
+ # @return [RestClient::Response] the set of repository docker manifests
258
+ def docker_manifests(id)
259
+ criteria = {:type_ids => [Runcible::Extensions::DockerManifest.content_type]}
260
+ unit_search(id, criteria).map { |i| i['metadata'].with_indifferent_access }
261
+ end
262
+
243
263
  # Retrieves the docker image IDs for a single repository
244
264
  #
245
265
  # @param [String] id the ID of the repository
@@ -4,7 +4,7 @@ module Runcible
4
4
  ID = 'docker_importer'
5
5
  REPO_TYPE = 'docker-repo'
6
6
 
7
- attr_accessor 'upstream_name', 'mask_id'
7
+ attr_accessor 'upstream_name', 'mask_id', 'enable_v1'
8
8
 
9
9
  def id
10
10
  DockerImporter::ID
@@ -1,3 +1,3 @@
1
1
  module Runcible
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcible
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric D Helms, Justin Sherrill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -132,6 +132,7 @@ files:
132
132
  - lib/runcible/extensions/consumer_group.rb
133
133
  - lib/runcible/extensions/distribution.rb
134
134
  - lib/runcible/extensions/docker_image.rb
135
+ - lib/runcible/extensions/docker_manifest.rb
135
136
  - lib/runcible/extensions/errata.rb
136
137
  - lib/runcible/extensions/ostree_branch.rb
137
138
  - lib/runcible/extensions/package_category.rb
@@ -192,8 +193,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
193
  version: '0'
193
194
  requirements: []
194
195
  rubyforge_project:
195
- rubygems_version: 2.2.3
196
+ rubygems_version: 2.4.6
196
197
  signing_key:
197
198
  specification_version: 4
198
199
  summary: ''
199
200
  test_files: []
201
+ has_rdoc: