summaryrefslogtreecommitdiff
path: root/lib/chef/provider/template
Commit message (Collapse)AuthorAgeFilesLines
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-2/+2
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Use accessor instead of class variable (cleanup)Salim Alam2015-09-301-12/+12
|
* Use Chef::FileContentManagement::Tempfile to create temp fileSalim Alam2015-09-291-1/+1
|
* CHEF-5012: add methods for template breadcrumbsLamont Granquist2015-08-181-0/+10
| | | | | | | | | | | | | | adds: - cookbook_name - recipe_name - recipe_line_string - recipe_path - recipe_line - template_name - template_path accessible both as instance var (@-) and method (bare), like @node/node.
* fixing trailing blank lines as wellLamont Granquist2014-07-291-1/+0
|
* Improve line separator conversion on windowsDaniel DeLeo2013-06-071-0/+1
| | | | | | | | * Unconditionally convert \r\n or \n to \r\n. This fixes cases where double converversion would result in \r\r\n * Use binmode to avoid double conversion in IO streams * Use binmode in tests to make sure we're not processing content before testing it.
* Make sure that windows line endings are protected during template rendering.sersut2013-05-301-3/+6
|
* Move helper module compilation inside template resourcedanielsdeleo2013-05-291-2/+0
| | | | | | | - Resource::Template compiles helper methods/module bodies into a collection of modules for inclusion into the template context. - Resource::Template checks for obvious invalid input to helper definition methods.
* Pass template extensions through to partialsdanielsdeleo2013-05-291-30/+0
| | | | | | | - 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.
* Add helper method/module support to template resourcedanielsdeleo2013-05-291-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds helper methods to a template via the following syntax: ``` template "name" do # singular method definition: helper(:method_name) { method_body } # inline module definition helpers do def method_name method_body end end # external module inclusion helpers(MyHelperModule) end ``` In each of the above cases, variables defined by Chef (e.g., `@node`) or the user (via `:variables => {}`) can be accessed as normal. Could use the following improvements: - Template partials are not supported - Input validation on Resource::Template should be improved - Needs Unit tests for Template provider/implementation classes
* Move file content management logic outside of providers under ↵sersut2013-05-161-2/+2
| | | | Chef::FileContentManagement for reusability in the future.
* more spec test workLamont Granquist2013-03-221-4/+4
|
* locate objects closer to their primary concernsLamont Granquist2013-03-201-0/+56