summaryrefslogtreecommitdiff
path: root/lib/chef/formatters
Commit message (Collapse)AuthorAgeFilesLines
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-081-2/+2
| | | | | | | | | | | | | 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>
* Fix show_progress in remote_file is causing FloatDomainError: InfinityVivek Singh2019-09-191-3/+3
| | | | | | | - Add check to avoid total if zero or nil. - Set @progress[resource] default value to -1 so that it can start with 0%. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-052-2/+2
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/ClassCheckLamont Granquist2019-07-054-6/+6
| | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-053-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-023-74/+37
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-023-0/+6
| | | | | | | 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>
* Convert require to require_relativeLamont Granquist2019-05-0812-29/+29
| | | | | | | 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>
* Target Mode initial implementationBryan McLellan2019-05-062-0/+2
| | | | Signed-off-by: Bryan McLellan <btm@chef.io>
* Update more brand names to currentTim Smith2019-05-033-4/+5
| | | | | | Update Chef Client and Chef Server brand names to current. Signed-off-by: Tim Smith <tsmith@chef.io>
* Reload the changes, adapt a bitTensibai2019-05-023-11/+13
| | | | Signed-off-by: Tensibai <tensibai@iabis.net>
* chef-client => Chef::Dist::CLIENTMarc Chamberland2019-04-264-5/+9
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-111-46/+2
| | | | | | | | This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Extract Action Collection from Data CollectorLamont Granquist2019-03-112-2/+2
| | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Misc YARD updates for knifeTim Smith2019-01-251-1/+13
| | | | | | Some YARD fixes as I was reading through knife bits. Signed-off-by: Tim Smith <tsmith@chef.io>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-155-36/+36
| | | | | | | 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-035-5/+5
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/MutableConstantLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/UnneededInterpolationLamont Granquist2018-07-022-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-022-4/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* clean up whitespace againLamont Granquist2018-07-024-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-025-141/+141
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-022-9/+9
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Simplify the deprecations system a bit, and introduce ways to silence ↵Noah Kantrowitz2018-06-142-18/+13
| | | | | | deprecation warnings. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Feed the Rubocop.Noah Kantrowitz2018-04-261-1/+1
| | | | | | Some day I will remember which is which on string styles. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Allow specifying `ignore_failure :quiet` to disable the error spew.Noah Kantrowitz2018-04-261-1/+1
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* mechanical conversion of most debug log statements to traceThom May2018-03-261-3/+3
| | | | Signed-off-by: Thom May <thom@chef.io>
* Chefstyle fixes.Noah Kantrowitz2017-04-031-4/+3
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Expand the system info displayed on error to give us some more data to work ↵Noah Kantrowitz2017-03-311-1/+19
| | | | | | with when helping users. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-132-11/+10
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/DefWithParenthesesLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-162-5/+24
| | | | | | | | 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>
* Hook up the recipe_file_loaded event which was defined but not actually called.Noah Kantrowitz2016-09-021-2/+2
| | | | | | | This also extends two of the recipe events to get the recipe name in addition to the path because that's usually useful for display. These arguments are both added at the end so the auto-magic argument trimmer will keep backwards compat. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* autofixing Style/MultilineIfThen copLamont Granquist2016-08-161-2/+2
|
* Log platform in pretty error outputcd/log-platformJordan Running2016-03-182-1/+3
|
* Merge pull request #4658 from chef/tm/remote_file_download_progress11.9Thom May2016-03-151-0/+16
|\ | | | | Remote file download progress
| * Enable progress output to be configuredtm/remote_file_download_progressThom May2016-03-041-2/+2
| | | | | | | | Add tests around progress output and tidy up
| * Merge branch 'remote-file-download-progress' of ↵Thom May2016-03-031-0/+16
| |\ | | | | | | | | | https://github.com/brandocorp/chef into tm/remote_file_download_progress
| | * new doc formatter event, remove progress barBrandon Raabe2015-03-201-0/+16
| | |
* | | manual fixing for raise unlessLamont Granquist2016-03-141-2/+2
| | |
* | | chefstyle Style/AndOr fixesLamont Granquist2016-03-143-4/+4
| | | | | | | | | | | | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* | | add comments and cleanupLamont Granquist2016-02-091-0/+1
| | |
* | | get the formatting for cookbook gems correctLamont Granquist2016-02-091-0/+25
|/ / | | | | | | | | | | | | | | | | | | 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.
* | autofixing whitespace copsLamont Granquist2016-02-0512-77/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | auto-fixing some easy copschefstyle/fixesLamont Granquist2016-02-033-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 3 Performance/CaseWhenSplat: Place when conditions with a splat at the end of the when branches. 1 Style/ElseAlignment: Align else with if. 1 Style/EvenOdd: Replace with Fixnum#even?. 1 Style/MethodDefParentheses: Use def with parentheses when there are parameters. 3 Style/PercentQLiterals: Do not use %Q unless interpolation is needed. Use %q. 3 Style/SpaceAfterColon: Space missing after colon. 2 Style/SpaceAfterMethodName: Do not put a space between a method name and the opening parenthesis. 2 Style/Tab: Tab detected. 1 Style/TrailingUnderscoreVariable: Do not use trailing _s in parallel assignment. 1 Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w.
* | Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-0210-12/+12
| | | | | | 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-025-5/+5
| | | | | | 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-0210-10/+10
| | | | | | 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"
* | Merge pull request #4434 from chef/lcg/better-eof-errorsLamont Granquist2016-01-276-7/+51
|\ \ | | | | | | adds EOFError message to handlers
| * | explicit specs for EOFErrorslcg/better-eof-errorsLamont Granquist2016-01-261-3/+3
| | |