summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8986 from ↵Lamont Granquist2020-02-241-2/+6
|\ | | | | | | | | MsysTechnologiesllc/VSingh/fix-knife-download-environments ChefFS & knife environment matching the output
| * ChefFS and knife environment matching the outputVivek Singh2019-10-141-2/+6
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Chefstyle fixes identified with Rubocop 0.80Tim Smith2020-02-181-5/+5
| | | | | | | | | | | | The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Use .load! in the Cookbook loader not .load_cookbooksTim Smith2020-01-235-5/+5
| | | | | | | | | | | | We added a deprecation warning to load_cookbooks and this is going to cause a ton of console spam for end users. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Added client side validation to validate presence of metadata files and ↵Vasu11052019-12-201-0/+1
| | | | | | | | | | | | validate name field Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Updated code to make sure temporary directory gets deleted after the uploadVasu11052019-12-181-16/+22
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Fixed specs and chefstyle errorVasu11052019-12-161-1/+1
| | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Updated knife cookbook upload and knife upload code to create temporary ↵Vasu11052019-12-161-28/+16
| | | | | | | | | | | | directory and copies all cookbooks into it and then generate metadata.json if it does not exist and load it to upload on Chef server Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Genrates metadata.json if not present and uploads it to chef server and ↵Vasu11052019-12-161-5/+27
| | | | | | | | | | | | deletes the local copy of it from chef repo Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-087-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Chefstyle fixesVivek Singh2019-10-283-3/+3
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Invoke chefignore for cookbook_dir itselfVivek Singh2019-10-285-5/+5
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Fix knife cookbook site share chefignore lookupVivek Singh2019-10-281-3/+4
| | | | | | | | | | | | | | | | Fix cookbook syntax_check dir path error if cookbook_path is an array Fix invalid error if cookbook_path set to nil or empty Array and TypeError: no implicit conversion of nil into String Chefignore for each cookbooks/:cookbook Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Add chefignore method to ChefRepositoryFileSystemCookbookDirVivek Singh2019-10-281-0/+6
|/ | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Style/SymbolProcLamont Granquist2019-07-059-9/+9
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-058-10/+10
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/ClassCheckLamont Granquist2019-07-051-1/+1
| | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-1/+1
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-0518-37/+37
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Layout/MultilineMethodCallIndentationLamont Granquist2019-07-022-4/+4
| | | | | | | | Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-021-1/+1
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-0221-0/+57
| | | | | | | 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>
* Merge pull request #8460 from cc-build/dist_solo_zeroTim Smith2019-05-271-1/+2
|\ | | | | Add distro constants for solo, zero and automate
| * more distro constants for "Chef"Marc Chamberland2019-05-231-1/+2
| | | | | | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* | Fix for knife bootstrap inheritance issue with knife plugins (#8585)Vasundhara Jagdale2019-05-241-2/+0
|/ | | | | | * Fix for knife bootstrap inheritance issue with knife plugins Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* This hits the ones that are most frequently required.lcg/require-idempotencyLamont Granquist2019-05-207-7/+7
| | | | | | | | | 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>
* Change some more require to require_relativeLamont Granquist2019-05-102-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix a bunch of weirdly mangled require linesLamont Granquist2019-05-082-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-0899-282/+282
| | | | | | | 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>
* fix knife diff exceptionslcg/knife-diff-exceptionsLamont Granquist2019-05-031-12/+11
| | | | | | closes #4189 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fixes for extra cookbook_path chef-soloVivek Singh2019-02-051-1/+2
| | | | | | - Create directory recursively instead to assume that parent dir should exist. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-153-8/+9
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-0313-23/+23
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* replace some instances of to_hash with to_hlcg/to-h-cleanupLamont Granquist2018-09-262-3/+3
| | | | | | | | | | | 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/MutableConstantLamont Granquist2018-07-025-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/PreferredHashMethodsLamont Granquist2018-07-022-6/+6
| | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/UnneededInterpolationLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/DotPositionLamont Granquist2018-07-024-12/+12
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-029-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* added one more rspec testJeremy J. Miller2018-05-161-2/+2
| | | | Signed-off-by: Jeremy J. Miller <jm@chef.io>
* object validation for DataHandlerBase#normalize_hashJeremy J. Miller2018-05-151-3/+7
| | | | Signed-off-by: Jeremy J. Miller <jm@chef.io>
* Revert "cookbooks metadata are used instead of directory name"lcg/actuall-test-cheffsLamont Granquist2018-04-231-18/+32
| | | | This reverts commit 85653e8f25c19273fde0d8d512db29ef13c2a579.
* Revert "fix Chef-14 chef_fs/chef-zero perf regression"Lamont Granquist2018-04-231-27/+19
| | | | This reverts commit 79c8782bbc9ca07898bda6ff9a3a7cdcc39bcdcf.
* fix Chef-14 chef_fs/chef-zero perf regressionlcg/chef-zero-perfLamont Granquist2018-04-101-19/+27
| | | | | | | | | | | | | | | | | | Fixes a perf bug introduced by #6471 where we were taking O(n^2) with the number of cookbook versions in the cookbook synch phase. This is a minimum viable fix that changes the algorithm so that it does the old, fast method of looking up the CBV first. Only if it doesn't find it does it then go searching for cookbooks that are in a differently named directory but which match by the name in the metadata. There may be edge conditions here if people mix-and-match and have cookbooks which have both named-directory and name-in-metadata versions. Please try not to do that. Don't cross the streams. 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>
* rubocop fixes from engine bump to 0.54.0lcg/rubocop-fixesLamont Granquist2018-03-211-9/+9
| | | | | | some cops got a little stricter. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #6838 from chef/revert-6773-revert-6770-tm/ruby_25Lamont Granquist2018-03-121-2/+2
|\ | | | | Bump to ruby 2.5.0
| * chef_fs fix for ruby 2.5Lamont Granquist2018-03-091-2/+2
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fix some yard warningsyard_warningsTim Smith2018-03-112-2/+2
|/ | | | | | More Rubymine warnings Signed-off-by: Tim Smith <tsmith@chef.io>
* fix chefstyletm/fix_chefstyle_againThom May2018-02-201-3/+3
| | | | Signed-off-by: Thom May <thom@chef.io>