summaryrefslogtreecommitdiff
path: root/lib/chef/policy_builder
Commit message (Collapse)AuthorAgeFilesLines
* replace some instances of to_hash with to_hlcg/to-h-cleanupLamont Granquist2018-09-261-3/+5
| | | | | | | | | | | to_hash on a lot of these objects should go away, but even eliminating all our calls to to_hash on these objects internally is difficult. (e.g. converting the knife ui code to call #to_h means we wind up calling nil#to_h which "helpfully" becomes '{}' which is hilarious and i don't know why someone thought that was a good idea). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* mechanical conversion of most debug log statements to traceThom May2018-03-263-4/+4
| | | | Signed-off-by: Thom May <thom@chef.io>
* RFC 106: expose name and chef_environment as attrstm/chef_environmentThom May2018-03-091-0/+6
| | | | | | | We also now set chef_environment the same as policy group when that's appropriate Signed-off-by: Thom May <thom@chef.io>
* Remove redundant defensive codeJon Cowie2018-03-051-4/+1
| | | | Signed-off-by: Jon Cowie <jonlives@gmail.com>
* Add attribute hoisting into coreJon Cowie2018-03-011-0/+13
| | | | | | 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-1/+27
| | | | Signed-off-by: Tyler Cloke <tylercloke@gmail.com>
* RFC 67: Remove cookbook segmentsThom May2017-04-042-7/+9
| | | | | | | | | 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>
* Chef-13: Remove Chef::PolicyBuilder::ExpandNodeObject#load_nodeLamont Granquist2017-02-281-28/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5410 from johnbellone/masterThom May2017-01-171-0/+1
|\ | | | | Add the policyfile revision_id as an automatic attribute.
| * Add the policyfile revision_id as an automatic attribute.John Bellone2016-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | /cc @coderanger @danielsdeleo We have been looking for an easy way to get this value into our error reporting application and it surprised me that it isn't already captured. If there's a better way to do this totally open for thoughts! Signed-off-by: John Bellone <jbellone@bloomberg.net>
* | Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-1/+1
|/ | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* Ensure that solo specific code is run at the proper timeThom May2016-05-163-5/+5
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* fix specsLamont Granquist2016-03-141-3/+3
|
* manual fixing for raise unlessLamont Granquist2016-03-141-9/+5
|
* chefstyle Style/AndOr fixesLamont Granquist2016-03-142-10/+10
| | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* Merge pull request #4478 from chef/lcg/rfc-060-gem-metadataLamont Granquist2016-03-032-2/+8
|\ | | | | RFC-060 gem metadata MVP
| * get the formatting for cookbook gems correctLamont Granquist2016-02-092-5/+5
| | | | | | | | | | | | | | | | | | | | this leverages the PR: https://github.com/bundler/bundler/pull/4245 to redirect output from bundler into chef's logger/formatter to get the UI right. if you don't have that in the external bundler you'll just get output on STDOUT. fix is to upgrade bundler.
| * RFC-060 gem metadata MVPLamont Granquist2016-02-092-0/+6
| |
* | deal with 0.37.2 renamed copsLamont Granquist2016-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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?
* | Merge pull request #4573 from chef/lcg/bump-rubocopLamont Granquist2016-02-121-3/+3
|\ \ | | | | | | pull rubocop 0.37.2 into chefstyle
| * | convert MultilineOperationIndentation style to "indented"Lamont Granquist2016-02-122-4/+4
| | | | | | | | | | | | this looks nicer.
| * | pull rubocop 0.37.2 into chefstyleLamont Granquist2016-02-121-1/+1
| |/ | | | | | | | | this is from the same ruleset that we had, but the new code catches more conditions.
* | Inflating the cookbook version object in policyfile compat modeandy-dufour2016-02-121-1/+1
|/
* autofixing whitespace copsLamont Granquist2016-02-053-8/+7
| | | | | | | | | | | | | | | | | | | | | | 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-8/+8
| | | 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-20/+20
| | | | | | | 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.
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-4/+4
|
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-113-6/+10
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* validateLamont Granquist2015-10-262-0/+3
|
* Added run list expansion json conversion. Creates a json tree from the run ↵kyleen/addExpandedRunListKyleen MacGugan2015-10-211-0/+1
| | | | | | | | | | list expansion trace. Added event to report expanded run list Updated json conversion to use chef compat json. Remove RunListExpansion from JsonCompat
* Un-remove ExpandNodeObject#load_node, deprecate itpolicybuilder-load-node-unremovedanielsdeleo2015-10-011-0/+30
| | | | Some third-party tools are using this, we need it to work.
* Remove experimental feature warning for policyfilesremove-policyfile-warningdanielsdeleo2015-09-241-6/+4
| | | | Also, improve the language around unsupported features/options.
* Apply a named_run_list in policy builder via configurationdanielsdeleo2015-09-211-1/+35
|
* Add `setup_chef_class` to Policyfile policy builderdanielsdeleo2015-09-172-1/+74
| | | | Also, mark internal public API as @private
* Update code comment to reflect realitydanielsdeleo2015-09-171-3/+1
|
* Document policy builder API on the dynamic builderdanielsdeleo2015-09-171-0/+56
|
* Use Forwardable to delegate in PolicyBuilder::Dynamicdanielsdeleo2015-09-171-32/+13
|
* Detect when user wants policyfile compat modedanielsdeleo2015-09-171-1/+8
|
* Set the precedence of policyfile attrs and propagate them everywheredanielsdeleo2015-09-171-0/+43
|
* Use the dynamic policy builder everywheredanielsdeleo2015-09-173-30/+12
|
* Add Dynamic PolicyBuilder to switch on policyfile modedanielsdeleo2015-09-171-0/+136
| | | | | | 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.
* Display policy name and ID during the chef rundanielsdeleo2015-05-221-0/+1
|
* move where we dep inject the priority mapsLamont Granquist2015-04-151-6/+0
| | | | | fixes the priority maps on chef-apply by wiring it up in the constructor of the client
* add resource_resolver and resource_priority_mapLamont Granquist2015-04-152-1/+20
| | | | also wire them up through the Chef class.
* Handle cookbook artfact format differences when fetching cookbookspolicyfile-erchef-integrationdanielsdeleo2015-03-251-1/+5
| | | | | | | | | Cookbook artifacts differ in these ways: * the name field is the cookbook name instead of name+version * there is no "cookbook_name" field * cookbook artifacts don't have a json_class when downloaded from the server * there is an identifier field
* Update policyfile URLs and cookbook artifact data format per RFCdanielsdeleo2015-03-251-4/+4
|
* Include relative URLs in error messagesdanielsdeleo2015-02-121-4/+6
|
* Fetch cookbooks from cookbook_artifacts/ in native api modedanielsdeleo2015-02-121-7/+27
|