summaryrefslogtreecommitdiff
path: root/lib/chef/event_dispatch/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add after_resource to pair with current_resourceLamont Granquist2020-03-311-0/+3
| | | | | | | | | | | | | | | | | | | For custom resources which correctly implement load_current_value the new after_resource comes for "free" and load_current_value will be called twice to load the current_resource (should be renamed the "before_resource" but that ship sailed) and then the after_resource. Appropriate wiring is added for a new event and capturing that into the action_collection and then the data_collector. The resource_reporter has not and will not be updated. For old style resources which are difficult to convert to custom resources (thinking here particularly of the 1:N model of the service resource in core chef, or stuff that just may be a lot of work like the file resource) then they can override the load_after_resource to manually wire up their own after_resource. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-021-172/+86
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-111-31/+0
| | | | | | | | 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-111-1/+18
| | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Makes life easier for hook authors switching from the older report handler ↵Noah Kantrowitz2017-11-271-2/+2
| | | | | | syntax. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* RFC 59: Load Ohai pluginstm/ohai_plugins_2Thom May2017-04-051-0/+16
| | | | | | This adds a new phase in the compilation of the run context. Signed-off-by: Thom May <thom@chef.io>
* add attribute_changed hook to event handlersLamont Granquist2016-10-281-0/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* 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>
* Merge pull request #4658 from chef/tm/remote_file_download_progress11.9Thom May2016-03-151-0/+6
|\ | | | | Remote file download progress
| * Enable progress output to be configuredtm/remote_file_download_progressThom May2016-03-041-6/+6
| | | | | | | | Add tests around progress output and tidy up
| * Merge branch 'remote-file-download-progress' of ↵Thom May2016-03-031-0/+6
| |\ | | | | | | | | | https://github.com/brandocorp/chef into tm/remote_file_download_progress
| | * new doc formatter event, remove progress barBrandon Raabe2015-03-201-0/+9
| | |
* | | add comments and cleanupLamont Granquist2016-02-091-5/+1
| | |
* | | get the formatting for cookbook gems correctLamont Granquist2016-02-091-0/+24
|/ / | | | | | | | | | | | | | | | | | | 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-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
* | Added run list expansion json conversion. Creates a json tree from the run ↵kyleen/addExpandedRunListKyleen MacGugan2015-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | list expansion trace. Added event to report expanded run list Updated json conversion to use chef compat json. Remove RunListExpansion from JsonCompat
* | Pass deprecations through formatter instead of logsJohn Keiser2015-09-011-5/+10
| |
* | Revert back to the first argument being cookbook_name.Noah Kantrowitz2015-07-311-1/+1
| |
* | Make the doc formatter actually show what version of a cookbook is being used.Noah Kantrowitz2015-07-221-2/+2
| | | | | | | | | | | | | | | | This has bugged me forever. It does change the API of the Formatter system in a ~non-back-compat way but I don't think I've actually seen any formatters outside of core Chef so how much do we want to worry about this? We could write a shim in `Chef::EventDispatcher::Dispatcher` to check the arity of the method if needed.
* | Add comments and use def self.x instead of class<<selfJohn Keiser2015-06-231-1/+1
| |
* | Create the `action :name do ... end` syntax for ResourceJohn Keiser2015-06-231-16/+40
| |
* | Make sure the audit mode output is reflected both in the logs and in the ↵Serdar Sutay2015-05-291-2/+2
| | | | | | | | formatter output.
* | Display policy name and ID during the chef rundanielsdeleo2015-05-221-0/+5
|/
* Update DSL method name to controls_group.mcquin/control_groupClaire McQuin2015-01-151-3/+3
| | | | | | | | | | | | | | | | | | Update to use control_group. Unify wording along control_group. Unify wording along control_group. Fix typo. Enable audit mode. Update to use control_group syntax. Update for audit DSL changes. Update for audit DSL change.
* Addressing review comments, adding documentationtyler-ball2014-12-181-0/+5
|
* Wiring audit event proxy to send events correctly to the audit_reportertyler-ball2014-12-171-10/+7
|
* Adding first round of formatter integration - STDOUT doc formattertyler-ball2014-12-171-5/+22
|
* Creating our own example group class to simplify adding examples to the spec ↵tyler-ball2014-12-171-0/+16
| | | | runner
* typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-081-1/+1
|
* Add ability to stream (and indent) command outputJohn Keiser2014-04-301-0/+14
|
* compute elapsed time without altering public apiRanjib Dey2013-11-061-2/+2
|
* pass elapsed time along with node/exception in event hanldersRanjib Dey2013-11-061-2/+2
|
* Normalize whitespace on all filesSeth Vargo2013-09-261-1/+1
|
* Adding the run_started callbackPrajaktaPurohit2013-04-241-0/+3
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+311
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!