diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-08-13 15:25:17 -0700 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-08-13 15:53:29 -0700 |
| commit | caca187dffbd6e628d7eda599c7f2939dd05fafc (patch) | |
| tree | 3bda82a89dd30d9612a229ac3b38588df146b50a /lib/puppet/resource | |
| parent | 6b1dd81799a44288287d9ab0cdf46afa3aaf090a (diff) | |
Moved perform_initial_import from Puppet::Resource::TypeCollection to Puppet::Node::Environment.
This change is part of an ongoing effort to remove functionality from
TypeCollection that is not related to keeping track of a collection of
types. This reduces TypeCollection's linkage to the environment,
which is a step toward decoupling it from the type loading mechanism.
Also, added a spec test to verify that TypeCollection.version is
correctly recomputed when types are re-imported.
Diffstat (limited to 'lib/puppet/resource')
| -rw-r--r-- | lib/puppet/resource/type_collection.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/puppet/resource/type_collection.rb b/lib/puppet/resource/type_collection.rb index 3a327e264..4254b037e 100644 --- a/lib/puppet/resource/type_collection.rb +++ b/lib/puppet/resource/type_collection.rb @@ -110,24 +110,6 @@ class Puppet::Resource::TypeCollection end end - def perform_initial_import - return if Puppet.settings[:ignoreimport] - parser = Puppet::Parser::Parser.new(environment) - if code = Puppet.settings.uninterpolated_value(:code, environment.to_s) and code != "" - parser.string = code - else - file = Puppet.settings.value(:manifest, environment.to_s) - return unless File.exist?(file) - parser.file = file - end - parser.parse - rescue => detail - msg = "Could not parse for environment #{environment}: #{detail}" - error = Puppet::Error.new(msg) - error.set_backtrace(detail.backtrace) - raise error - end - def stale? @watched_files.values.detect { |file| file.changed? } end |
