| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
While Chef already implements a nice amount of information
in `TemplateError#to_s`, when using ChefSpec with RSpec, the `#to_s`
is not called, leaving us with no source information for template
errors.
By adding the filename to `Erubis::Eruby` initialization, we can get
a better backtrace that will show up in RSpec output.
Signed-off-by: Gabriel Mazetto <brodock@gmail.com>
|
|
|
|
|
|
| |
Mostly remove some warnings when running yard on the CLI
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
| |
this is part of our informal style guide, lets make it formal since
clearly its not getting followed very well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
|
|
|
| |
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.
|
|\
| |
| | |
Fixing Issue #2513 - the broken render of nested partial templates
|
| |
| |
| |
| |
| |
| | |
variables
Authors: Kaushik C <kaushik.chand@gmail.com>, Sam Dunne <sam@sam-dunne.com>
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In some windows testing environments no line separator conversion is
happening. This may be a function of git settings, or something else in
our test cluster environment. In any case, line separators are
irrelevant to these tests, as they are testing the partial template
feature. We could remove the line endings from the test fixture files,
but editors like vim add hidden newlines at the end of files, so this is
difficult to maintain. Stripping the line endings within the test code
is more sustainable option.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
| |
DRYness and readability. While here let's also extend the API to support local templates, as well as templates from other cookbooks.
|
| |
|
|
|
|
| |
The opscode/chef repository now only contains the core Chef library code
used by chef-client, knife and chef-solo!
|
|
|
|
| |
all with proper deps
|
| |
|
|
|