summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2008-10-18 12:53:27 +0200
committerJames Turnbull <james@lovedthanlost.net>2008-10-21 21:14:23 +1100
commitec2b4619d3c90b09e1b9fda0020552d5a2d6061f (patch)
treec8b11e31644362cbace552214512fffcd61949a9 /lib
parent356d8cab14ce9600b39b8fdf48beea7c7fbcf345 (diff)
downloadpuppet-ec2b4619d3c90b09e1b9fda0020552d5a2d6061f.tar.gz
puppet-ec2b4619d3c90b09e1b9fda0020552d5a2d6061f.tar.xz
puppet-ec2b4619d3c90b09e1b9fda0020552d5a2d6061f.zip
Fix #1115 - part2 - fix tests and add all_tags
Up until this patch, TemplateWrapper.tags was returning all the tags defined in the catalog. I think this is wrong and tags shoul only return the defined tags in the current scope. Hence, I defined a all_tags method that returns the list of tags defined in the whole catalog.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/templatewrapper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb
index 824fc48ef..00f364088 100644
--- a/lib/puppet/parser/templatewrapper.rb
+++ b/lib/puppet/parser/templatewrapper.rb
@@ -42,8 +42,13 @@ class Puppet::Parser::TemplateWrapper
return scope.catalog.classes
end
- # Allow templates to access the defined tags
+ # Allow templates to access the tags defined in the current scope
def tags
+ return scope.tags
+ end
+
+ # Allow templates to access the all the defined tags
+ def all_tags
return scope.catalog.tags
end