summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/resource.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-09-19 21:56:05 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-09-22 09:27:23 +1000
commitaf57483e618ace39c0d4540fd0f8479f5430f0ef (patch)
treed9ddab25529e482bb715e9b799b519169f5cb127 /lib/puppet/parser/resource.rb
parentd42bda1f22e3beca321700a78aab9c1399537c30 (diff)
downloadpuppet-af57483e618ace39c0d4540fd0f8479f5430f0ef.tar.gz
puppet-af57483e618ace39c0d4540fd0f8479f5430f0ef.tar.xz
puppet-af57483e618ace39c0d4540fd0f8479f5430f0ef.zip
Fixing #2632 - 'require' works for 0.25 clients
I couldn't find a way to make it compatible with earlier clients, so the docs specify that it doesn't work with them, and it helpfully fails. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/parser/resource.rb')
-rw-r--r--lib/puppet/parser/resource.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index 29b1fb1ac..b8aaf2715 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -175,6 +175,11 @@ class Puppet::Parser::Resource
end
end
+ # Unless we're running >= 0.25, we're in compat mode.
+ def metaparam_compatibility_mode?
+ ! (catalog and version = catalog.client_version and version = version.split(".") and version[0] == "0" and version[1].to_i >= 25)
+ end
+
# Return the resource name, or the title if no name
# was specified.
def name
@@ -335,11 +340,6 @@ class Puppet::Parser::Resource
end
end
- # Unless we're running >= 0.25, we're in compat mode.
- def metaparam_compatibility_mode?
- ! (catalog and version = catalog.client_version and version = version.split(".") and version[0] == "0" and version[1].to_i >= 25)
- end
-
def add_scope_tags
if scope_resource = scope.resource
tag(*scope_resource.tags)