From 0e336bf62b818aaa31fcc323ab5d31e5eb92eb46 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 5 Oct 2007 00:07:38 -0500 Subject: This commit is focused on getting the 'puppet' executable to work. As a result, it involves a lot of integration-level testing, and a lot of small design changes to make the code actually work. In particular, indirections can now have default termini, so that configurations and facts default to their code terminus Also, I've removed the ability to manually control whether ast nodes are used. I might need to add it back in later, but if so it will be in the form of a global setting, rather than the previous system of passing it through 10 different classes. Instead, the parser detects whether there are AST nodes defined and requires them if so or ignores them if not. About 75 tests are still failing in the main set of tests, but it's going to be a long slog to get them working -- there are significant design issues around them, as most of the failures are a result of tests trying to emulate both the client and server sides of a connection, which normally would have different fact termini but in this case must have the same terminus just because they're in the same process and are global. The next step, then, is to figure that process out, thus finding a way to make this all work. --- lib/puppet/node/configuration.rb | 2 +- lib/puppet/node/facts.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet/node') diff --git a/lib/puppet/node/configuration.rb b/lib/puppet/node/configuration.rb index 3571eecda..084bdf880 100644 --- a/lib/puppet/node/configuration.rb +++ b/lib/puppet/node/configuration.rb @@ -7,7 +7,7 @@ require 'puppet/external/gratr/digraph' # and the relationships between them. class Puppet::Node::Configuration < Puppet::PGraph extend Puppet::Indirector - indirects :configuration + indirects :configuration, :terminus_class => :code # The host name this is a configuration for. attr_accessor :name diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb index a2e6d9c04..2da6c488e 100755 --- a/lib/puppet/node/facts.rb +++ b/lib/puppet/node/facts.rb @@ -9,7 +9,7 @@ class Puppet::Node::Facts extend Puppet::Indirector # Use the node source as the indirection terminus. - indirects :facts + indirects :facts, :terminus_class => :code attr_accessor :name, :values -- cgit