summaryrefslogtreecommitdiff
path: root/spec/unit/run_context
Commit message (Collapse)AuthorAgeFilesLines
* Chef-15: Remove copyright dateslcg/remove-copyright-dates-chef-15Lamont Granquist2020-04-132-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-021-4/+4
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixes for chefstyle bumpLamont Granquist2019-07-021-20/+20
| | | | | | | | result of automation https://github.com/chef/chefstyle/pull/72 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-15: cookbook compiler should parse only .rb fileslcg/parse-only-rb-filesLamont Granquist2019-05-031-1/+9
| | | | | | | Fixes #6281 which is a frequently reported issue where md files and swap files and other junk causes the cookbook compiler to barf. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-111-7/+0
| | | | | | | | This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-15: require instead of load librariesLamont Granquist2018-11-191-1/+5
| | | | | | | | This reverts a change which was working around problems caused by unforked interval runs. Fixes issues with chefspec, should make it faster and reduce warning spam. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Work around rspec 3.8.0 issuesLamont Granquist2018-09-251-3/+3
| | | | | | | | | | | | | | | | | Problem is described in detail here: https://github.com/rspec/rspec-expectations/issues/1068#issuecomment-424580564 Note that this is self-inflicted damage and our pattern of having #to_hash on objects be called by #to_json and to produce a serialized 'flavor' of the object breaks what ruby's semantics are supposed to be and those should all be `#to_h` methods, and we should deprecate `#to_hash` but I imagine that will be a reasonably large breaking change (Although hopefully most of the use by users will be Node#to_hash which is entirely correct usage since that thing is actually a kind of glorified Hash-like monster). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* RFC 67: Remove cookbook segmentsThom May2017-04-041-3/+1
| | | | | | | | | This implements RFC 67, which removes cookbook segments, and moves to a single list of all the files contained in a cookbook. This allows us to move forward with better audit modes and also proper shipping of ohai plugins. Signed-off-by: Thom May <thom@chef.io>
* Thanks, Windows.Noah Kantrowitz2016-09-061-1/+3
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Hook up the recipe_file_loaded event which was defined but not actually called.Noah Kantrowitz2016-09-021-1/+41
| | | | | | | This also extends two of the recipe events to get the recipe name in addition to the path because that's usually useful for display. These arguments are both added at the end so the auto-magic argument trimmer will keep backwards compat. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-4/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* autofixing whitespace copsLamont Granquist2016-02-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-022-4/+4
| | | 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-022-2/+2
| | | 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-022-2/+2
| | | 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-142-22/+22
| | | | | | | 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.
* Make load/include recipe run in child contextjk/resource_actionsJohn Keiser2015-06-231-0/+27
|
* Remove unnecessary TODOsJohn Keiser2015-06-231-0/+106
|
* Update to RSpec 3.Claire McQuin2014-10-291-18/+18
|
* Raise an error when including a recipe from an unreachable cookbookdanielsdeleo2014-03-141-0/+12
| | | | | | | | | | | | | | | | | | | | Fixes CHEF-4367. When attempting to load a recipe belonging to a cookbook that is not in the run_list or any dependencies of cookbooks in the run_list, chef will now produce an error like this: Chef::Exceptions::MissingCookbookDependency ------------------------------------------- Recipe `ancient::aliens` is not in the run_list, and cookbook 'ancient' is not a dependency of any cookbook in the run_list. To load thisrecipe, first add a dependency on cookbook 'ancient' in the cookbook you're including it from in that cookbook's metadata. This error will occur when chef-solo users use `include_recipe` without specifying the dependency in metadata; prior to this patch, chef would typically fail reading an undefined attribute, which commonly would result in a NoMethodError for nil.
* Normalize whitespace on all filesSeth Vargo2013-09-261-3/+3
|
* Add methods to query for template/file existence in run contextdanielsdeleo2013-08-021-17/+1
| | | | | | | - Convenience methods added to CookbookVersion to query if a cookbook file or template is available for a given node in that cookbook - Convenience methods added to RunContext to query the existence of cookbook files or templates
* [CHEF-3817] Fix dedupe in cookbook_order by returning dependencies as symbols.Matthew Kent2013-06-181-0/+9
| | | | And add matching spec.
* [CHEF-3376] fix doc typodanielsdeleo2012-11-301-1/+1
|
* [CHEF-3376] move recipe compilation to CookbookCompilerdanielsdeleo2012-11-301-0/+4
|
* [CHEF-3376] make CookbookCompiler take a RunContextdanielsdeleo2012-11-301-5/+2
| | | | | The circular reference is not ideal, but it allows for complete extraction of all cookbook compilation into CookbookCompiler.
* [CHEF-3376] extract CookbookCompiler specsdanielsdeleo2012-11-301-0/+180