runcible 0.4.10 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/runcible/extensions/consumer.rb +12 -4
- data/lib/runcible/extensions/consumer_group.rb +12 -4
- data/lib/runcible/version.rb +1 -1
- metadata +24 -25
@@ -68,7 +68,7 @@ module Runcible
|
|
68
68
|
# @param [Hash] options to pass to content update
|
69
69
|
# @return [RestClient::Response] task representing the update operation
|
70
70
|
def self.update_content(id, type_id, units, options={})
|
71
|
-
self.update_units(id, generate_content(type_id, units), options)
|
71
|
+
self.update_units(id, generate_content(type_id, units, options), options)
|
72
72
|
end
|
73
73
|
|
74
74
|
# Uninstall content from a consumer
|
@@ -85,8 +85,9 @@ module Runcible
|
|
85
85
|
#
|
86
86
|
# @param [String] type_id the type of content (e.g. rpm, errata)
|
87
87
|
# @param [Array] units array of units
|
88
|
+
# @param [Hash] options contains options which may impact the format of the content (e.g :all => true)
|
88
89
|
# @return [Array] array of formatted content units
|
89
|
-
def self.generate_content(type_id, units)
|
90
|
+
def self.generate_content(type_id, units, options={})
|
90
91
|
content = []
|
91
92
|
|
92
93
|
case type_id
|
@@ -98,11 +99,18 @@ module Runcible
|
|
98
99
|
unit_key = :id
|
99
100
|
end
|
100
101
|
|
101
|
-
|
102
|
+
if options[:all]
|
102
103
|
content_unit = {}
|
103
104
|
content_unit[:type_id] = type_id
|
104
|
-
content_unit[:unit_key] = {
|
105
|
+
content_unit[:unit_key] = {}
|
105
106
|
content.push(content_unit)
|
107
|
+
else
|
108
|
+
units.each do |unit|
|
109
|
+
content_unit = {}
|
110
|
+
content_unit[:type_id] = type_id
|
111
|
+
content_unit[:unit_key] = { unit_key => unit }
|
112
|
+
content.push(content_unit)
|
113
|
+
end
|
106
114
|
end
|
107
115
|
content
|
108
116
|
end
|
@@ -75,7 +75,7 @@ module Runcible
|
|
75
75
|
# @param [Hash] options to pass to content update
|
76
76
|
# @return [RestClient::Response] task representing the update operation
|
77
77
|
def self.update_content(id, type_id, units, options={})
|
78
|
-
self.update_units(id, generate_content(type_id, units), options)
|
78
|
+
self.update_units(id, generate_content(type_id, units, options), options)
|
79
79
|
end
|
80
80
|
|
81
81
|
# Uninstall content from a consumer group
|
@@ -92,8 +92,9 @@ module Runcible
|
|
92
92
|
#
|
93
93
|
# @param [String] type_id the type of content (e.g. rpm, errata)
|
94
94
|
# @param [Array] units array of units
|
95
|
+
# @param [Hash] options contains options which may impact the format of the content (e.g :all => true)
|
95
96
|
# @return [Array] array of formatted content units
|
96
|
-
def self.generate_content(type_id, units)
|
97
|
+
def self.generate_content(type_id, units, options={})
|
97
98
|
content = []
|
98
99
|
|
99
100
|
case type_id
|
@@ -105,11 +106,18 @@ module Runcible
|
|
105
106
|
unit_key = :id
|
106
107
|
end
|
107
108
|
|
108
|
-
|
109
|
+
if options[:all]
|
109
110
|
content_unit = {}
|
110
111
|
content_unit[:type_id] = type_id
|
111
|
-
content_unit[:unit_key] = {
|
112
|
+
content_unit[:unit_key] = {}
|
112
113
|
content.push(content_unit)
|
114
|
+
else
|
115
|
+
units.each do |unit|
|
116
|
+
content_unit = {}
|
117
|
+
content_unit[:type_id] = type_id
|
118
|
+
content_unit[:unit_key] = { unit_key => unit }
|
119
|
+
content.push(content_unit)
|
120
|
+
end
|
113
121
|
end
|
114
122
|
content
|
115
123
|
end
|
data/lib/runcible/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -131,35 +131,35 @@ extensions: []
|
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
133
133
|
- lib/runcible.rb
|
134
|
-
- lib/runcible/
|
135
|
-
- lib/runcible/
|
136
|
-
- lib/runcible/
|
134
|
+
- lib/runcible/resources/consumer_group.rb
|
135
|
+
- lib/runcible/resources/consumer.rb
|
136
|
+
- lib/runcible/resources/repository.rb
|
137
|
+
- lib/runcible/resources/event_notifier.rb
|
138
|
+
- lib/runcible/resources/repository_group.rb
|
139
|
+
- lib/runcible/resources/user.rb
|
140
|
+
- lib/runcible/resources/unit.rb
|
141
|
+
- lib/runcible/resources/role.rb
|
142
|
+
- lib/runcible/resources/repository_schedule.rb
|
143
|
+
- lib/runcible/resources/task.rb
|
144
|
+
- lib/runcible/extensions/package_group.rb
|
137
145
|
- lib/runcible/extensions/consumer_group.rb
|
138
|
-
- lib/runcible/extensions/
|
146
|
+
- lib/runcible/extensions/importer.rb
|
147
|
+
- lib/runcible/extensions/rpm.rb
|
148
|
+
- lib/runcible/extensions/yum_distributor.rb
|
139
149
|
- lib/runcible/extensions/consumer.rb
|
140
150
|
- lib/runcible/extensions/repository.rb
|
141
|
-
- lib/runcible/extensions/
|
142
|
-
- lib/runcible/extensions/yum_distributor.rb
|
143
|
-
- lib/runcible/extensions/rpm.rb
|
144
|
-
- lib/runcible/extensions/iso_distributor.rb
|
145
|
-
- lib/runcible/extensions/unit.rb
|
151
|
+
- lib/runcible/extensions/export_distributor.rb
|
146
152
|
- lib/runcible/extensions/yum_importer.rb
|
147
|
-
- lib/runcible/extensions/
|
148
|
-
- lib/runcible/extensions/
|
153
|
+
- lib/runcible/extensions/unit.rb
|
154
|
+
- lib/runcible/extensions/package_category.rb
|
149
155
|
- lib/runcible/extensions/yum_repo_metadata_file.rb
|
156
|
+
- lib/runcible/extensions/iso_distributor.rb
|
157
|
+
- lib/runcible/extensions/errata.rb
|
158
|
+
- lib/runcible/extensions/iso_importer.rb
|
150
159
|
- lib/runcible/extensions/distribution.rb
|
151
|
-
- lib/runcible/
|
152
|
-
- lib/runcible/resources/consumer_group.rb
|
153
|
-
- lib/runcible/resources/consumer.rb
|
154
|
-
- lib/runcible/resources/repository_schedule.rb
|
155
|
-
- lib/runcible/resources/task.rb
|
156
|
-
- lib/runcible/resources/event_notifier.rb
|
157
|
-
- lib/runcible/resources/repository.rb
|
158
|
-
- lib/runcible/resources/user.rb
|
159
|
-
- lib/runcible/resources/unit.rb
|
160
|
-
- lib/runcible/resources/repository_group.rb
|
161
|
-
- lib/runcible/version.rb
|
160
|
+
- lib/runcible/extensions/distributor.rb
|
162
161
|
- lib/runcible/base.rb
|
162
|
+
- lib/runcible/version.rb
|
163
163
|
- LICENSE
|
164
164
|
- Rakefile
|
165
165
|
- Gemfile
|
@@ -190,4 +190,3 @@ signing_key:
|
|
190
190
|
specification_version: 3
|
191
191
|
summary: ''
|
192
192
|
test_files: []
|
193
|
-
has_rdoc:
|