From ec2b4619d3c90b09e1b9fda0020552d5a2d6061f Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Sat, 18 Oct 2008 12:53:27 +0200 Subject: 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. --- lib/puppet/parser/templatewrapper.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit