This commit removes logging from the hook package and relies on returning errors
to convey...errors. Encountered errors are returned immediately. This commit
may alter the behavior of hook. If errors were logged in the past but the given
function did not return immediately, this commit would change that behavior.
Uses named errors and custom error types. You may be able to
consolidate ArgumentError and SourceError, but I need to think about it
some more. These changes should be transparent to the caller if they're
expecting standard "error" types.
Tests have been updated to validate error return values and provide test
coverage for a few new lines of code introduced by this commit.
This commit provides 100% test coverage of the hook package.
Two bugs were discovered with these tests. I'll be submitting separate
commits to fix those issues.
This commit removes the "helpers" package by moving functions from the
package into the other packages that use them.
CheckPayloadSignature() and ExtractParamater() are simply moved to the
"hook" package. I'm not sure of the usefulness of having these
functions exported, but I left them allow for now.
ValuesToMap() is moved to the "main" webhook package and renamed to
valuesToMap().
Tests were moved into the "hook" package since we only test
ExtractParameter() right now.
This commit closesadnanh/webhook#12.