diff options
author | Luke Kanies <luke@madstop.com> | 2007-08-26 21:54:17 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-08-26 21:54:17 -0500 |
commit | 11081ce8864dca2bc92d8c9f825c3fe7f96333f4 (patch) | |
tree | 89bc049324cd3d20bcb05b55e6c267e50b82aec9 /lib/puppet/parser/parser_support.rb | |
parent | 9ea8e6cc8772053548d3438393dd1ead986ed719 (diff) | |
download | puppet-11081ce8864dca2bc92d8c9f825c3fe7f96333f4.tar.gz puppet-11081ce8864dca2bc92d8c9f825c3fe7f96333f4.tar.xz puppet-11081ce8864dca2bc92d8c9f825c3fe7f96333f4.zip |
Multiple environment support now works, and I have even tested it in real life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
-rw-r--r-- | lib/puppet/parser/parser_support.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb index 401b5b1c0..660fa8169 100644 --- a/lib/puppet/parser/parser_support.rb +++ b/lib/puppet/parser/parser_support.rb @@ -15,7 +15,7 @@ class Puppet::Parser::Parser AST = Puppet::Parser::AST - attr_reader :file, :version + attr_reader :version, :environment attr_accessor :files @@ -85,6 +85,10 @@ class Puppet::Parser::Parser raise except end + def file + @lexer.file + end + def file=(file) unless FileTest.exists?(file) unless file =~ /\.pp$/ |