| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
|
| |
|
| |
Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
|
| |
|
| |
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"
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| |
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Chef::FileContentManagement for reusability in the future.
|
| | |
|
| |
|