chef-handler-slnky 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba5fa0c8dcb63ea600dc2f08f782a263f1def3dd
4
- data.tar.gz: e048acd21c8c7b7039340b5ba722225ccb2c3c67
3
+ metadata.gz: 530304442a0689c92d3935227070f514005a3428
4
+ data.tar.gz: b9e07ac36ee91b5898b0b5ea0eb8ad1c87456499
5
5
  SHA512:
6
- metadata.gz: eac399e58e2a384fa0b70a3bc09bf18096b2cb77e6581c0864e79629f3e9b8d0861dbbe79265e41ea651ecde909e3ba8fc1f668a68cead678d6c050b99ad18af
7
- data.tar.gz: 9dd709322016a4d17514be89a09b13af5b3023f2d1fcc44cbd4e32a43185170fb5e0d976c84fc7dad12fdf55372261b3b59c0a92eb88ae2768d6459f5ab748c2
6
+ metadata.gz: 404a0dcf9d62a0f2d14f914aee8973bfaada0f16cde0bdc756130ece429bb54aa8f4087304f207bb51284ce97ab7b77e1f2efba46410108d49b845b2c4674077
7
+ data.tar.gz: 2865a051d775d240ab6c9a1cde3ef27a8a334fd3a61db42f6bf46a847f821f53f15e640aaf2d3d241c7e123c48bd0d40c50014250324dafd7b0b91b7ea54c383
data/README.md CHANGED
@@ -45,6 +45,8 @@ Create a recipe with the following:
45
45
  # `node['slnky']['url']`
46
46
  # set this in a recipe or attributes file to point the handler
47
47
  # to the server
48
+ # if you set `node['slnky']['file']` to the location of a yaml file
49
+ # it will load the data and include it in the event in the `attributes` key
48
50
  chef_gem "chef-handler-slnky" do
49
51
  action :upgrade
50
52
  end
@@ -1,6 +1,7 @@
1
1
  require "chef/handler/slnky/version"
2
2
  require 'chef/handler'
3
3
  require 'slnky'
4
+ require 'yaml'
4
5
 
5
6
  class Chef
6
7
  class Handler
@@ -9,9 +10,12 @@ class Chef
9
10
  def report
10
11
  event = "chef.run.#{run_status.success? ? 'success' : 'failure'}"
11
12
  server = node['slnky']['url']
13
+ file = node['slnky']['yaml']
14
+ attrs = file && File.exists?(file) ? YAML.load_file(file) : {}
12
15
  data = {
13
16
  name: event,
14
17
  node: node.name,
18
+ attributes: attrs,
15
19
  elapsed: run_status.elapsed_time,
16
20
  exception: run_status.exception,
17
21
  updated: run_status.updated_resources.count,
@@ -1,7 +1,7 @@
1
1
  class Chef
2
2
  class Handler
3
3
  class Slnky
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-slnky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Catanzarite