summaryrefslogtreecommitdiff
path: root/lib/chef/run_context.rb
Commit message (Collapse)AuthorAgeFilesLines
* auto fixing some rubocopsLamont Granquist2016-02-091-2/+2
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-5/+3
| | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-4/+4
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-141-10/+10
| | | | | | | 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.
* immediately_before -> beforeJohn Keiser2015-12-091-14/+14
|
* Add immediately_before notificationJohn Keiser2015-12-091-0/+43
|
* Unnecessary capitalizationTim Smith2015-10-181-2/+2
|
* This wasn't intended to be a protected method.Noah Kantrowitz2015-09-291-3/+3
| | | /cc @jkeiser
* Make resource_collection= @api private instead of deprecatedjk/api-private-resource-collectionJohn Keiser2015-09-281-5/+3
|
* Rename log.deprecation to log_deprecationJohn Keiser2015-09-011-4/+4
|
* Pass deprecations through formatter instead of logsJohn Keiser2015-09-011-4/+4
|
* Fix deprecated setters.Noah Kantrowitz2015-06-241-0/+7
| | | Adds actual implementation for deprecated setters, and re-adds the accidentally removed resource_collection= setter.
* Make load/include recipe run in child contextjk/resource_actionsJohn Keiser2015-06-231-3/+3
|
* Remove unnecessary TODOsJohn Keiser2015-06-231-5/+0
|
* Delegate all necessary methods from ChildRunContext to RunContextJohn Keiser2015-06-231-6/+61
|
* Create the `action :name do ... end` syntax for ResourceJohn Keiser2015-06-231-60/+54
|
* Give run contexts children instead of using external dupingJohn Keiser2015-06-231-91/+361
|
* rename consume_cookbook_collectionLamont Granquist2015-05-181-1/+1
|
* add/fix node attributesLamont Granquist2015-05-181-0/+1
| | | | | | * fix node[:recipes] * add node[:expanded_run_list] * add node[:cookbooks]
* Fix more incorrect terminologyJulian C. Dunn2015-03-111-1/+1
|
* chef/run_context comment: use "predictable" word instead of "preserved" for ↵Xabier de Zuazo2015-01-271-2/+2
| | | | Hash ordering description
* Update some ruby 1.8 related comments (issue #2497)Xabier de Zuazo2015-01-271-2/+2
|
* make include_recipe "::foo" use current cookbookLamont Granquist2015-01-201-4/+4
| | | | | | | | | | | | | | | | The following code is brittle if you want to fork the cookbook and rename it (which is a best practice when forking cookbooks for internal use): ```ruby if node[:platform_family] == "rhel" include_recipe "mycookbook::_rhel" end ``` In order for cookbooks to be easily renamable they can currently use the syntax `include_recipe "#{cookbook_name}::_rhel"` which is unwieldy. This patch adds `include_recipe "::_rhel"` as syntax sugar to make this easier.
* Resolving conflicsts from giant rebasetyler-ball2014-12-171-4/+4
|
* Updating to use audit syntax rather than controltyler-ball2014-12-171-3/+3
|
* Use a central runnerClaire McQuin2014-12-171-2/+2
|
* Adding audit mode JSON formattertyler-ball2014-12-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First pass at DSL additions Renaming DSL methods to match the spec Creating our own example group class to simplify adding examples to the spec runner Adding logic for exceptions from converge phase not interfering with audit phase and vice-versa Adding error handling so saving node doesn't prevent us from running audit mode - decouples converge phase and audit phase more Updating for github comments Add setup phase to audit-mode. Refactor runner into own class. Fix typo tie things together Adding first round of formatter integration - STDOUT doc formatter Preparing for demo - using rspec documentation formatter for output instead of the proxy Add serverspec types and matchers. add rspec/its Add gems as core dependencies Updating with changes from demo Updating with @mcquin and @lamont comments Getting rid of unused method Wiring audit event proxy to send events correctly to the audit_reporter removing old pry debugging statement Removing unecessary todo Sending to correct server URL Fixing TODOs Adding uncaught error information
* Make sure we don't close the output_stream after running rspec.Serdar Sutay2014-12-171-4/+9
|
* Adding audit mode JSON formattertyler-ball2014-12-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First pass at DSL additions Renaming DSL methods to match the spec Creating our own example group class to simplify adding examples to the spec runner Adding logic for exceptions from converge phase not interfering with audit phase and vice-versa Adding error handling so saving node doesn't prevent us from running audit mode - decouples converge phase and audit phase more Updating for github comments Add setup phase to audit-mode. Refactor runner into own class. Fix typo tie things together Adding first round of formatter integration - STDOUT doc formatter Preparing for demo - using rspec documentation formatter for output instead of the proxy Add serverspec types and matchers. add rspec/its Add gems as core dependencies Updating with changes from demo Updating with @mcquin and @lamont comments Getting rid of unused method Wiring audit event proxy to send events correctly to the audit_reporter removing old pry debugging statement Removing unecessary todo Sending to correct server URL Fixing TODOs Adding uncaught error information
* Adding first round of formatter integration - STDOUT doc formattertyler-ball2014-12-171-0/+1
|
* Adding audit mode JSON formattertyler-ball2014-12-171-0/+6
|
* First pass at fixing broken notificationstyler-ball2014-12-161-4/+4
| | | | | | Fixing some code I changed unecessarily Removing TODOs which are not necessary
* polishing provider_resolverLamont Granquist2014-11-081-5/+0
| | | | | | | | * makes provides? more correct for linux services * makes supports? more targetted for linux services * remove provider_resolver from the run_context * fix timestamped deploy spec * add more specs
* Chef-12 RC Provider ResolverLamont Granquist2014-10-241-2/+2
| | | | | makes resource and provider class resolution more dynamic. begins deprecation of Chef::Platform static mapping.
* Initial sketch for provider resolverRichard Manyanza2014-10-221-1/+5
|
* Switch from class variables to class instance variables; tweak temporary ↵Chris Doherty2014-09-101-2/+2
| | | | logging a bit.
* 'timeout' -> 'delay_mins'; add a run_context() shim for RebootPending.Chris Doherty2014-09-101-0/+1
|
* Move reboot data into run_context. (Dan D. confirms his prior opinions from ↵Chris Doherty2014-09-101-0/+24
| | | | https://github.com/opscode/chef/pull/1279#discussion-diff-9964101.)
* Add ability to stream (and indent) command outputJohn Keiser2014-04-301-0/+22
|
* Change missing dependency from hard error to warning for now.danielsdeleo2014-03-141-1/+2
|
* Raise an error when including a recipe from an unreachable cookbookdanielsdeleo2014-03-141-2/+21
| | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1128 from opscode/lcg/CHEF-4777lamont-granquist2014-01-161-1/+1
|\ | | | | CHEF-4777: add include_recipes to recipes node attr
| * CHEF-4777: fix for fully qualifying recipesLamont Granquist2014-01-161-1/+1
| | | | | | | | | | | | this makes it so that the recipes in the attribute will be fully qualified, and will avoid the problem of both "cookbook" and "cookbook::default" showing up.
| * CHEF-4777: add include_recipes to recipes node attrLamont Granquist2013-11-141-1/+1
| |
* | Add ability to run recipes directly from chef-client command lineJohn Keiser2013-12-061-0/+11
|/
* Add methods to query for template/file existence in run contextdanielsdeleo2013-08-021-0/+14
| | | | | | | - 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-3376] expose loaded recipes as an arraydanielsdeleo2012-11-301-10/+23
| | | | | `loaded_recipes` is a Hash-based set internally, but only the keys are actually useful.