summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser_support.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-17 12:47:41 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-05-15 10:01:26 +1000
commitc6084093e67b1e415e49c192b3ac6f6b9aebc4ba (patch)
treedcff2f7076b8e5f16d727e926bf3c0b72e45e215 /lib/puppet/parser/parser_support.rb
parent83ba0e5efe4514201c1a627ceffdaef992431734 (diff)
downloadpuppet-c6084093e67b1e415e49c192b3ac6f6b9aebc4ba.tar.gz
puppet-c6084093e67b1e415e49c192b3ac6f6b9aebc4ba.tar.xz
puppet-c6084093e67b1e415e49c192b3ac6f6b9aebc4ba.zip
Moving file-searching code out of Puppet::Module
The Module class had a bunch of code for finding manifests and templates even when not in a module, and it complicated the class unnecessarily. This moves that code to a new, hackish-but-sufficient module for just that purpose. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
-rw-r--r--lib/puppet/parser/parser_support.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index d59093799..3a6853f27 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -2,6 +2,7 @@
# tired of rebuilding the parser.rb file all the time.
class Puppet::Parser::Parser
require 'puppet/parser/functions'
+ require 'puppet/parser/files'
ASTSet = Struct.new(:classes, :definitions, :nodes)
@@ -183,7 +184,7 @@ class Puppet::Parser::Parser
"in file #{@lexer.file} at line #{@lexer.line}"
)
end
- files = Puppet::Module::find_manifests(pat, :cwd => dir, :environment => @environment)
+ files = Puppet::Parser::Files.find_manifests(pat, :cwd => dir, :environment => @environment)
if files.size == 0
raise Puppet::ImportError.new("No file(s) found for import " +
"of '#{pat}'")