runcible 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CONTRIBUTING.md +0 -0
- data/LICENSE +0 -0
- data/README.md +10 -0
- data/lib/runcible.rb +0 -0
- data/lib/runcible/base.rb +15 -3
- data/lib/runcible/extensions/consumer.rb +9 -6
- data/lib/runcible/extensions/consumer_group.rb +0 -0
- data/lib/runcible/extensions/distribution.rb +0 -0
- data/lib/runcible/extensions/errata.rb +0 -0
- data/lib/runcible/extensions/importer.rb +0 -0
- data/lib/runcible/extensions/package_category.rb +0 -0
- data/lib/runcible/extensions/package_group.rb +0 -0
- data/lib/runcible/extensions/rpm.rb +0 -0
- data/lib/runcible/resources/consumer.rb +3 -2
- data/lib/runcible/resources/event_notifier.rb +0 -0
- data/lib/runcible/resources/repository_schedule.rb +0 -0
- data/lib/runcible/resources/role.rb +0 -0
- data/lib/runcible/resources/task.rb +0 -0
- data/lib/runcible/resources/unit.rb +0 -0
- data/lib/runcible/resources/user.rb +0 -0
- data/lib/runcible/version.rb +1 -1
- metadata +38 -2
data/CONTRIBUTING.md
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -108,7 +108,17 @@ To see RestClient logs while testing:
|
|
108
108
|
|
109
109
|
logging=true
|
110
110
|
|
111
|
+
## Updating Documentation
|
111
112
|
|
113
|
+
The documentation is built with yard and hosted on Github via the gh-pages branch of the repository. To update the documentation on Github:
|
114
|
+
|
115
|
+
yard doc
|
116
|
+
git checkout gh-pages
|
117
|
+
cp -rf doc/* ./
|
118
|
+
git add ./
|
119
|
+
git commit -a -m 'Updating docs to version X.X'
|
120
|
+
git push <upstream> gh-pages
|
121
|
+
|
112
122
|
## Building and Releasing
|
113
123
|
|
114
124
|
### Gem
|
data/lib/runcible.rb
CHANGED
File without changes
|
data/lib/runcible/base.rb
CHANGED
@@ -48,9 +48,13 @@ module Runcible
|
|
48
48
|
:logging => {}
|
49
49
|
}.merge(conf)
|
50
50
|
end
|
51
|
-
|
52
|
-
def self.config
|
53
|
-
@@config
|
51
|
+
|
52
|
+
def self.config
|
53
|
+
if defined?(@@config)
|
54
|
+
@@config
|
55
|
+
else
|
56
|
+
raise Runcible::ConfigurationUndefinedError, Runcible::ConfigurationUndefinedError.message
|
57
|
+
end
|
54
58
|
end
|
55
59
|
|
56
60
|
def self.call(method, path, options={})
|
@@ -209,4 +213,12 @@ module Runcible
|
|
209
213
|
end
|
210
214
|
|
211
215
|
end
|
216
|
+
|
217
|
+
class ConfigurationUndefinedError < StandardError
|
218
|
+
|
219
|
+
def self.message
|
220
|
+
# override me to change the error message
|
221
|
+
"Configuration not set. Runcible::Base.config= must be called before Runcible::Base.config."
|
222
|
+
end
|
223
|
+
end
|
212
224
|
end
|
@@ -30,10 +30,11 @@ module Runcible
|
|
30
30
|
#
|
31
31
|
# @param [String] id the consumer ID
|
32
32
|
# @param [String] repo_id the repo ID to bind to
|
33
|
+
# @param [Boolean] notify_agent sends consumer a notification
|
33
34
|
# @return [RestClient::Response] set of tasks representing each bind operation
|
34
|
-
def self.bind_all(id, repo_id)
|
35
|
+
def self.bind_all(id, repo_id, notify_agent=true)
|
35
36
|
Runcible::Extensions::Repository.retrieve_with_details(repo_id)['distributors'].collect do |d|
|
36
|
-
self.bind(id, repo_id, d['id'])
|
37
|
+
self.bind(id, repo_id, d['id'], {:notify_agent=>notify_agent})
|
37
38
|
end.flatten
|
38
39
|
end
|
39
40
|
|
@@ -53,9 +54,10 @@ module Runcible
|
|
53
54
|
# @param [String] id the consumer ID
|
54
55
|
# @param [String] type_id the type of content to install (e.g. rpm, errata)
|
55
56
|
# @param [Array] units array of units to install
|
57
|
+
# @param [Hash] options to pass to content install
|
56
58
|
# @return [RestClient::Response] task representing the install operation
|
57
|
-
def self.install_content(id, type_id, units)
|
58
|
-
self.install_units(id, generate_content(type_id, units))
|
59
|
+
def self.install_content(id, type_id, units, options={})
|
60
|
+
self.install_units(id, generate_content(type_id, units), options)
|
59
61
|
end
|
60
62
|
|
61
63
|
# Update content on a consumer
|
@@ -63,9 +65,10 @@ module Runcible
|
|
63
65
|
# @param [String] id the consumer ID
|
64
66
|
# @param [String] type_id the type of content to update (e.g. rpm, errata)
|
65
67
|
# @param [Array] units array of units to update
|
68
|
+
# @param [Hash] options to pass to content update
|
66
69
|
# @return [RestClient::Response] task representing the update operation
|
67
|
-
def self.update_content(id, type_id, units)
|
68
|
-
self.update_units(id, generate_content(type_id, units))
|
70
|
+
def self.update_content(id, type_id, units, options={})
|
71
|
+
self.update_units(id, generate_content(type_id, units), options)
|
69
72
|
end
|
70
73
|
|
71
74
|
# Uninstall content from a consumer
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -113,10 +113,11 @@ module Runcible
|
|
113
113
|
# @param [String] id the ID of the consumer
|
114
114
|
# @param [String] repo_id the ID of the repository
|
115
115
|
# @param [String] distributor_id the ID of the distributor
|
116
|
+
# @param [Hash] optional optional parameters
|
116
117
|
# @return [RestClient::Response]
|
117
|
-
def self.bind(id, repo_id, distributor_id)
|
118
|
+
def self.bind(id, repo_id, distributor_id, optional={})
|
118
119
|
required = required_params(binding.send(:local_variables), binding, ["id"])
|
119
|
-
call(:post, path("#{id}/bindings/"), :payload => { :required => required })
|
120
|
+
call(:post, path("#{id}/bindings/"), :payload => { :required => required, :optional=>optional })
|
120
121
|
end
|
121
122
|
|
122
123
|
# Unbind a consumer to a repository for a given distributor
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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.9
|
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-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -95,6 +95,42 @@ dependencies:
|
|
95
95
|
none: false
|
96
96
|
prerelease: false
|
97
97
|
type: :runtime
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: yard
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: !binary |-
|
105
|
+
MA==
|
106
|
+
none: false
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: !binary |-
|
112
|
+
MA==
|
113
|
+
none: false
|
114
|
+
prerelease: false
|
115
|
+
type: :development
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: maruku
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: !binary |-
|
123
|
+
MA==
|
124
|
+
none: false
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: !binary |-
|
130
|
+
MA==
|
131
|
+
none: false
|
132
|
+
prerelease: false
|
133
|
+
type: :development
|
98
134
|
description: Exposing Pulp's juiciest components to the Ruby world.
|
99
135
|
email:
|
100
136
|
- ehelms@redhat.com, jsherril@redhat.com
|