runcible 1.8.0 → 1.9.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: 6fddef47151b53308fce3a4a103f5a082e657f47
4
- data.tar.gz: 149ff0d3f758d5289c95e771f3056c567de70bc4
3
+ metadata.gz: 14d0204fcdbcaa07f4949abb27397aafb7a09d22
4
+ data.tar.gz: afb101209c948155d9372622f2baeb9476e672cd
5
5
  SHA512:
6
- metadata.gz: eb888ca430e0d85510c0c3116d673e762acf837eb23b4d79dffe0dccd6a74a362639303384dba25110670ad8cfb9adb60838e20f83c338318ff931219d70ad14
7
- data.tar.gz: ca48cd2e29a30c0c2fbddb5ad85c9d4273a95f9227b14d01ca22752ac093af9ed444bdcaec6172b774390fc9575ab197b22da1d47018652f2717866419dce197
6
+ metadata.gz: 1a25802231315129b1a9197c38d8cf4076f344bdb49b0ad495dc1bbea745ec3c410b4bb95db74be526567e8869789bb66e34d428d578e061b563362d7ea89746
7
+ data.tar.gz: 845d1a82e495582274b32c03841152899f006e4169a6b25cc32da7fa53fb48f24521daffd27e4b826be20ff510eb9d13e7308a336a3d146028c346eb6f0ad38d
@@ -141,23 +141,31 @@ module Runcible
141
141
  # Retrieve the set of errata that is applicable to a consumer(s)
142
142
  #
143
143
  # @param [String, Array] ids string containing a single consumer id or an array of ids
144
- # @param [Array] repoids array of repository ids
145
- # @param [Boolean] consumer_report if true, result will list consumers and their
146
- # applicable errata; otherwise, it will list
147
- # errata and the consumers they are applicable to
148
144
  # @return [RestClient::Response] content applicability hash with details of errata available to consumer(s)
149
145
  def applicable_errata(ids)
146
+ applicable_for_type(ids, Runcible::Extensions::Errata.content_type)
147
+ end
148
+
149
+ # Retrieve the set of rpms that are applicable to a consumer(s)
150
+ #
151
+ # @param [String, Array] ids string containing a single consumer id or an array of ids
152
+ # @return [RestClient::Response] content applicability hash with details of rpms available to consumer(s)
153
+ def applicable_rpms(ids)
154
+ applicable_for_type(ids, Runcible::Extensions::Rpm.content_type)
155
+ end
156
+
157
+ private
158
+
159
+ def applicable_for_type(ids, type)
150
160
  ids = [ids] if ids.is_a? String
151
161
 
152
162
  criteria = {
153
163
  'criteria' => { 'filters' => { 'id' => { '$in' => ids } } },
154
- 'content_types' => [Runcible::Extensions::Errata.content_type]
164
+ 'content_types' => [type]
155
165
  }
156
166
  applicability(criteria)
157
167
  end
158
168
 
159
- private
160
-
161
169
  def repository_extension
162
170
  Runcible::Extensions::Repository.new(self.config)
163
171
  end
@@ -1,3 +1,3 @@
1
1
  module Runcible
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.9.0'.freeze
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.8.0
4
+ version: 1.9.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: 2016-07-26 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -197,9 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.4.6
200
+ rubygems_version: 2.2.5
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: ''
204
204
  test_files: []
205
- has_rdoc: