summaryrefslogtreecommitdiff
path: root/lib/chef/provider/template/content.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-05-27 11:15:01 -0700
committerdanielsdeleo <dan@opscode.com>2013-05-29 11:32:22 -0700
commitca4cd1f830fae2fac3e2c18bbd2693b0caddcb33 (patch)
tree705a53ee2a2fd379096a8a15ebd6c070a7667639 /lib/chef/provider/template/content.rb
parent00de51bb552ea2e613afec4825277b855775b71e (diff)
downloadchef-ca4cd1f830fae2fac3e2c18bbd2693b0caddcb33.tar.gz
Pass template extensions through to partials
- move the new TemplateContext code into mixin/template and consolidate with ChefContext - Copy extension modules from parent template to partial template. - Functional tests for helpers with partials.
Diffstat (limited to 'lib/chef/provider/template/content.rb')
-rw-r--r--lib/chef/provider/template/content.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/chef/provider/template/content.rb b/lib/chef/provider/template/content.rb
index 5629ee9a19..f26b7a5b92 100644
--- a/lib/chef/provider/template/content.rb
+++ b/lib/chef/provider/template/content.rb
@@ -23,36 +23,6 @@ class Chef
class Provider
class Template
- # TODO: extract to file
- # TODO: integrate into mixin/template (make it work with partials)
- # TODO: docs
- class TemplateContext < Erubis::Context
-
- def _define_helpers(helper_methods)
- # TODO (ruby 1.8 hack)
- # This is most elegantly done with Object#define_singleton_method,
- # however ruby 1.8.7 does not support that, so we create a module and
- # include it. This should be revised when 1.8 support is not needed.
- helper_mod = Module.new do
- helper_methods.each do |method_name, method_body|
- define_method(method_name, &method_body)
- end
- end
- extend(helper_mod)
- end
-
- def _define_helpers_from_blocks(blocks)
- blocks.each do |module_body|
- helper_mod = Module.new(&module_body)
- extend(helper_mod)
- end
- end
-
- def _extend_modules(module_names)
- module_names.each { |mod| extend(mod) }
- end
- end
-
class Content < Chef::FileContentManagement::ContentBase
include Chef::Mixin::Template