summaryrefslogtreecommitdiff
path: root/lib/chef/run_context
Commit message (Collapse)AuthorAgeFilesLines
* fix accidental mangling of the glob patternlcg/eager-load-libraries-optionLamont Granquist2020-04-031-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix chefspec monkeypatching madnessLamont Granquist2020-04-031-2/+2
| | | | | | Apparently chefspec considers this a public API (it isn't) Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Implement eager_load_libraries metadata optionLamont Granquist2020-04-031-6/+28
| | | | | | | | This implements RFC-40 from the old chef rfc repo: https://github.com/chef-boneyard/chef-rfc/blob/master/rfc040-on-demand-cookbook-libraries.md Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolProcLamont Granquist2019-07-051-1/+1
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-021-0/+4
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* This hits the ones that are most frequently required.lcg/require-idempotencyLamont Granquist2019-05-201-1/+1
| | | | | | | | | Stops the kernel from scanning through all the activated gems every time in order to resolve names into pathnames. See rubygems/rubygems#2762 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-081-5/+5
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-15: cookbook compiler should parse only .rb fileslcg/parse-only-rb-filesLamont Granquist2019-05-031-12/+11
| | | | | | | 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>
* Extract Action Collection from Data CollectorLamont Granquist2019-03-111-1/+1
| | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-15: require instead of load librariesLamont Granquist2018-11-191-2/+2
| | | | | | | | 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>
* Fix manifest entries for root filestm/fix_manifest_root_filesThom May2018-05-161-1/+1
| | | | | | | | We weren't consistently naming root files; in some places in the spec the names contained the `root_files` segment and in other places they didn't. This now always uses `root_files`. Signed-off-by: Thom May <thom@chef.io>
* Add the ability to inject log objectstm/inject_logThom May2018-03-191-9/+18
| | | | | | meaning that we can have inheritable metadata Signed-off-by: Thom May <thom@chef.io>
* Merge pull request #6017 from chef/tm/ohai_plugins_2Thom May2017-04-051-0/+35
|\ | | | | RFC 59 - Load ohai plugins
| * RFC 59: Load Ohai pluginstm/ohai_plugins_2Thom May2017-04-051-0/+35
| | | | | | | | | | | | This adds a new phase in the compilation of the run context. Signed-off-by: Thom May <thom@chef.io>
* | Feed the rubocop.Noah Kantrowitz2017-04-051-3/+3
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | Make root alias attributes work with the normal CookbookCompiler load behavior.Noah Kantrowitz2017-04-041-4/+13
|/ | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* RFC 67: Remove cookbook segmentsThom May2017-04-041-1/+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>
* Hook up the recipe_file_loaded event which was defined but not actually called.Noah Kantrowitz2016-09-021-2/+3
| | | | | | | 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>
* Ensure that chef-zero loads libraries recursivelytm/zero_deep_librariesThom May2016-03-031-0/+1
|
* autofixing whitespace copsLamont Granquist2016-02-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | 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-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-6/+6
| | | | | | | 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.
* 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
|
* [CHEF-3817] Fix dedupe in cookbook_order by returning dependencies as symbols.Matthew Kent2013-06-181-3/+3
| | | | And add matching spec.
* cleanup requires for lwrp base clasesdanielsdeleo2012-12-191-1/+1
|
* Extract LWRP resource code to LWRPBasedanielsdeleo2012-12-191-1/+1
|
* Extract provider LWRP code to LWRPBasedanielsdeleo2012-12-191-2/+2
|
* [CHEF-3376] Add debug logging for compile orderdanielsdeleo2012-11-301-0/+1
| | | | | | Ex: DEBUG: Cookbooks to compile: ["dependency1", "dependency2", "test-with-deps"]
* [CHEF-3376] fix incorrect doc, add more docsdanielsdeleo2012-11-301-1/+1
| | | | | * fix incorrect statement in CookbookCompiler docs * Add lots of doc to RunContext
* [CHEF-3376] remove redundant attr_accessordanielsdeleo2012-11-301-4/+4
|
* [CHEF-3376] rdoc more methods, reorganizedanielsdeleo2012-11-301-0/+1
|
* [CHEF-3376] move recipe compilation to CookbookCompilerdanielsdeleo2012-11-301-1/+26
|
* [CHEF-3376] make CookbookCompiler take a RunContextdanielsdeleo2012-11-301-16/+16
| | | | | The circular reference is not ideal, but it allows for complete extraction of all cookbook compilation into CookbookCompiler.
* [CHEF-3376] give CookbookCompiler its own filedanielsdeleo2012-11-301-0/+253