summaryrefslogtreecommitdiff
path: root/spec/unit/policy_builder
Commit message (Collapse)AuthorAgeFilesLines
* RFC 106: expose name and chef_environment as attrstm/chef_environmentThom May2018-03-091-0/+5
| | | | | | | We also now set chef_environment the same as policy group when that's appropriate Signed-off-by: Thom May <thom@chef.io>
* Make sure before block of specs is calling correct methods now defensive ↵jcowie/poise-hoistJon Cowie2018-03-051-1/+2
| | | | | | code removed Signed-off-by: Jon Cowie <jonlives@gmail.com>
* Add attribute hoisting into coreJon Cowie2018-03-011-2/+73
| | | | | | This commit implements RFC-105 and adds specs to verify attribute hoisting is working correctly in conjunction with existing attributes. Signed-off-by: Jon Cowie <jonlives@gmail.com>
* Properly send run_list_expanded event in policy node casetc/fix-expanded-run-list-reporting-for-policyfilesTyler Cloke2017-06-201-0/+50
| | | | Signed-off-by: Tyler Cloke <tylercloke@gmail.com>
* RFC 67: Remove cookbook segmentsThom May2017-04-041-12/+12
| | | | | | | | | 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>
* remove test that removing load_node brokeLamont Granquist2017-02-281-21/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: Remove Chef::PolicyBuilder::ExpandNodeObject#load_nodeLamont Granquist2017-02-281-6/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Ensure that solo specific code is run at the proper timeThom May2016-05-162-2/+2
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* Merge pull request #4663 from chef/lcg/better-chef-rspec-constraintsLamont Granquist2016-03-041-1/+1
|\ | | | | better chef+ruby rspec constraints
| * better chef+ruby rspec constraintsLamont Granquist2016-03-031-1/+1
| | | | | | | | | | | | | | | | lets us use Gem::Dependency constraints directly as rspec constraints for matching Chef::Version and RUBY_VERSION. copies some magic sauce from bundler that does something similar
* | Merge pull request #4478 from chef/lcg/rfc-060-gem-metadataLamont Granquist2016-03-031-0/+2
|\ \ | |/ |/| RFC-060 gem metadata MVP
| * fix broken specsLamont Granquist2016-02-091-0/+2
| |
* | deal with 0.37.2 renamed copsLamont Granquist2016-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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?
* | Fix policyfile testsad/fix_policyfile_zeroandy-dufour2016-02-121-2/+6
| |
* | autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-1/+1
| |
* | auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
|/ | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-053-32/+23
| | | | | | | | | | | | | | | | | | | | | | 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-023-3/+3
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-023-3/+3
| | | 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-143-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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-12/+12
| | | | chefstyle -a fixed 1044 occurrances
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-112-6/+8
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* stub #validate! methodLamont Granquist2015-10-261-0/+2
|
* Un-remove ExpandNodeObject#load_node, deprecate itpolicybuilder-load-node-unremovedanielsdeleo2015-10-011-0/+29
| | | | Some third-party tools are using this, we need it to work.
* Apply a named_run_list in policy builder via configurationdanielsdeleo2015-09-211-21/+85
|
* Add `setup_chef_class` to Policyfile policy builderdanielsdeleo2015-09-171-0/+13
| | | | Also, mark internal public API as @private
* Detect when user wants policyfile compat modedanielsdeleo2015-09-171-0/+13
|
* Set the precedence of policyfile attrs and propagate them everywheredanielsdeleo2015-09-171-0/+158
|
* Use the dynamic policy builder everywheredanielsdeleo2015-09-173-72/+72
|
* Add Dynamic PolicyBuilder to switch on policyfile modedanielsdeleo2015-09-171-0/+211
| | | | | | Now we need to switch PolicyBuilder implementations based on several factors instead of just a single config settings, including content of the node fetched from the Chef Server.
* Make policyfile native mode the defaultpolicyfile-native-defaultdanielsdeleo2015-05-201-1/+5
|
* add/fix node attributesLamont Granquist2015-05-181-2/+2
| | | | | | * fix node[:recipes] * add node[:expanded_run_list] * add node[:cookbooks]
* Update policyfile URLs and cookbook artifact data format per RFCdanielsdeleo2015-03-251-13/+48
|
* Remove ruby 1.8-specific code from testsdanielsdeleo2015-02-121-6/+0
|
* Fetch cookbooks from cookbook_artifacts/ in native api modedanielsdeleo2015-02-121-4/+28
|
* Reorganize contexts to better test compat vs. native mode behaviorsdanielsdeleo2015-02-121-75/+100
|
* Add policyfile native support to policy builderdanielsdeleo2015-01-271-1/+46
|
* Update to RSpec 3.Claire McQuin2014-10-292-38/+37
|
* move run_list twiddling into the policy builderThom May2014-03-041-1/+1
|
* [CHEF-3506] suppress final node save when using override run listdanielsdeleo2014-02-032-0/+16
|
* Delegate sync_cookbooks to policy_builder, subclasses rely on itdanielsdeleo2014-02-031-0/+4
|
* Add public API for expanding run_list in Chef::Clientdanielsdeleo2014-01-232-0/+33
| | | | | External projects like chefspec need to do this separately so they can inject custom behavior before/after.
* Fix Policyfile tests for ruby 1.8danielsdeleo2014-01-221-0/+6
|
* Fix incompatibilites between node expansion and policyfiledanielsdeleo2014-01-221-26/+59
|
* Update error messaging in Policyfile policy builderdanielsdeleo2014-01-221-5/+13
|
* Add Policyfile-based policy builder for chef-clientdanielsdeleo2014-01-221-0/+344
| | | | | | | | | | | | NB: This is experimental and a bit of a hack. There is no server-side support, so interactions with the server are coded in a "compatibility mode" using data bag items and Chef 11 style cookbook version APIs. The Policyfile PolicyBuilder uses a single document from the server as the authoritative cookbook version set and expanded run list. Enabling it will disable support for environments and roles. In addition, chef-solo and override run lists are currently unsupported, though they could be supported in the future.
* Extract "expand node" policy builder to new filedanielsdeleo2014-01-211-0/+295