puppet-slack
puppet-slack copied to clipboard
Update for URL-based webhooks, and message formatting
Slack has updated their Incoming Webhooks integration to use a single URL in place of the token-argument previously used.
This PR replaces slack_token
with slack_webhook
. It also eliminates slack_url
, as the team URL no longer factors into incoming webhooks.
Additionally, this PR makes use of Slack's Attachments API to color the bar next to the message as red or green, based on the success or failure of the Puppet run. It also uses the JSON standard library to convert a Ruby hash into JSON in lieu of the backslash-heavy string literal.
Can you split this PR in 2? Also, as it is It probably won't pass the unit tests. Can you first run them on your computer.
I removed nuclide2latex function from the PR. Small change to the function run() in sampling module was made for consistency to the reviewed _mp_apply_perturbation function and to allow all tests to run without troubles.
Replacement of the pendf perturbation procedure. New static method pendf_perturb to apply perturbations sample by sample.