0
-require 'rpm_interface'
0
Chassis.node_kind = name
0
- # Specify package dependencies for the details list. If this is called
0
- # more than once, the first list that contains a full match for installed
0
- # packages will be used.
0
- # +names+ is a list of package names (their dependencies will be
0
- # traced automatically)
0
+ # Specify details that will be used for matching incoming requests
0
+ # +details+ is a Hash of primitives
0
- def self.packages(*names)
0
- return if !Chassis.pkgs.empty?
0
+ def self.details(details)
0
+ raise("details() has already been called") unless Chassis.pkgs.empty?
0
- fully_installed = names.all? do |package|
0
- Powerset::PowerPack.installed?(package)
0
- deps = names.inject([]) do |acc, package|
0
- acc.concat Powerset::PowerPack.check(package).package_dependencies
0
- packs = Powerset::PowerPack.check_packages(deps.uniq)
0
- Chassis.pkgs = packs.compact.map { |p| [p.name, self.limit_version(p.version)] }
0
+ Chassis.pkgs = details.to_a
0
def self.config(&block)
0
class Awesome < Chassis
0
- packages "powerset_ruby", "tk"
0
+ details "failboat" => "sinking"
0
["grammar", "/tmp/awesome.lfg"]
0
- packages = [["powerset_ruby", [1, 8, 5, 9999]],
0
- ["tk", [8, 4, 14, 0]],
0
- ["readline", [5, 1, 4, 0]],
0
- ["tcl", [8, 4, 14, 0]]]
0
+ packages = [["failboat", "sinking"]]
0
assert_equal packages, Chassis.pkgs
0
ARGV.concat(["--tags=foo,bar", "--roles=production", "--", "--tags=baz,qux"])
0
- config = [["powerset_ruby", [1, 8, 5, 9999]],
0
- ["tk", [8, 4, 14, 0]],
0
- ["readline", [5, 1, 4, 0]],
0
- ["tcl", [8, 4, 14, 0]],
0
+ config = [["failboat", "sinking"],
0
["tags", "foo", "bar"],
0
["roles", "production"],
Comments
No one has commented yet.