summaryrefslogtreecommitdiff
path: root/spec/unit/run_context_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix Style/HashSyntaxLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Attributes v1.1 changeslcg/attributes-v1.1Lamont Granquist2016-06-271-2/+2
| | | | | | | | | | | - fixes *_unless behavior and set_unless_value_present hack from Chef 12 - simplifies rm_* code - introduces functional read/write/unlink/exist? API - deprecates method_missing access to attributes for Chef 13 - deprecates set/set_unless aliases for Chef 14 - removes MultiMash mess that I wrote for Chef 13 https://github.com/chef/chef/pull/5029 for more details
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-1/+1
| | | | no enforced trailing comma on arguments...
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-9/+9
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* autofixing whitespace copsLamont Granquist2016-02-051-2/+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-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"
* Use double quotes by defaultThom May2016-01-141-3/+3
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-10/+10
| | | | chefstyle -a fixed 1044 occurrances
* Make load/include recipe run in child contextjk/resource_actionsJohn Keiser2015-06-231-0/+3
|
* Delegate all necessary methods from ChildRunContext to RunContextJohn Keiser2015-06-231-0/+4
|
* These tests were accidently left out when I moved #2621 to mastertball/missed-teststyler-ball2015-06-081-0/+41
|
* add/fix node attributesLamont Granquist2015-05-181-0/+31
| | | | | | * fix node[:recipes] * add node[:expanded_run_list] * add node[:cookbooks]
* make include_recipe "::foo" use current cookbookLamont Granquist2015-01-201-0/+5
| | | | | | | | | | | | | | | | 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.
* Adding unit test coverage and updating per github reviewtyler-ball2014-12-161-55/+55
| | | | | | | | | Conflicts: spec/unit/recipe_spec.rb spec/unit/resource_spec.rb spec/unit/run_context_spec.rb Resolving cherry pick commit merge issues
* Execute and Script Resource improvementsLamont Granquist2014-12-081-1/+6
| | | | | | | | | | | - Warning on incorrect usage of the command resource in any script resource - Warning on code in script resource being nil - Specs added to force deprecation of incorrect usage in Chef-13 - Specs added around the (supported) incorrect usage in Chef-12 - Cleanup+Modernization of providers and specs - Fixed some global state bugs around the Chef::Log.level in the spec tests
* Update to RSpec 3.Claire McQuin2014-10-291-25/+25
|
* Add unit spec for reboot data in RunContext.Chris Doherty2014-09-101-0/+15
|
* Remove classes before redefining to fix warnings.danielsdeleo2014-04-241-0/+7
|
* Change missing dependency from hard error to warning for now.danielsdeleo2014-03-141-1/+3
|
* Raise an error when including a recipe from an unreachable cookbookdanielsdeleo2014-03-141-0/+5
| | | | | | | | | | | | | | | | | | | | 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.
* CHEF-4777: fix for fully qualifying recipesLamont Granquist2014-01-161-3/+4
| | | | | | 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-0/+3
|
* Normalize whitespace on all filesSeth Vargo2013-09-261-2/+2
|
* Add methods to query for template/file existence in run contextdanielsdeleo2013-08-021-1/+42
| | | | | | | - 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] extract CookbookCompiler specsdanielsdeleo2012-11-301-139/+0
|
* [CHEF-3376] Load all filetypes in run_list orderdanielsdeleo2012-11-301-17/+99
| | | | | | | | | | * Extract file loading for non-recipe types to implementation class. * Load libraries, LWRPs, Resource Definitions in approximate run_list order * Should not be a breaking change on chef-client, since the order is essentially random right now. On chef-solo, files from cookbooks that don't appear in the expanded run_list plus dependency graph will not be loaded, which is a change from the previous behavior.
* [CHEF-2903] load attribute files in run_list orderdanielsdeleo2012-11-071-0/+57
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+78
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!