chef-handler-updated-resources 0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 612b6a1ef52ffcd306c6790bc75f475f8c234489
4
+ data.tar.gz: 8820c723c42217199ed17c797ddaea91e7565874
5
+ SHA512:
6
+ metadata.gz: 9255b83c784a28b3f5c5541ce1ca9ea370e8408f150aae67ea16b3285e45b1a542388a764a68b1f567293d694146467a6c091677d8713f49653af9107f4e5225
7
+ data.tar.gz: 7c84f680c91d1dd52395ad9cefc256228e63ca856aaf30fe9894ec22d258b63db9e19fe807719447ace54f5d75c40d69693167fd038ee8a117930d9f0e186e83
data/README.md CHANGED
@@ -0,0 +1,53 @@
1
+ # chef-handler-updated-resources
2
+
3
+ Chef report handler to display resources updated in the Chef Run.
4
+
5
+ # Installation
6
+
7
+ This report handler should be installed into the Ruby environment used by Chef. This can be done with `/opt/chef/embedded/bin/gem` or `c:\opscode\embedded\bin\gem`. Or, it can be installed using the `chef_gem` resource.
8
+
9
+ # Usage
10
+
11
+ Configure `/etc/chef/client.rb` or other config file:
12
+
13
+ ```ruby
14
+ require 'chef/handler/updated_resources'
15
+ report_handlers << SimpleReport::UpdatedResources.new
16
+ ```
17
+
18
+ Optionally, pass an argument specifying a prefix for updated resource messages. The default is `' '` (two spaces). This may make it easier to grep for updated resources, depending on your tooling.
19
+
20
+ ```ruby
21
+ require 'chef/handler/updated_resources'
22
+ report_handlers << SimpleReport::UpdatedResources.new('GREPME')
23
+ ```
24
+
25
+ Or, use the [chef_handler cookbook](https://supermarket.chef.io/cookbooks/chef_handler).
26
+
27
+ ```ruby
28
+ chef_gem 'chef-handler-updated-resources' do
29
+ compile_time true
30
+ end
31
+
32
+ chef_handler 'SimpleReport::UpdatedResources' do
33
+ source 'chef/handler/updated_resources'
34
+ action :enable
35
+ end
36
+ ```
37
+
38
+ # License and Author
39
+
40
+ - Author: Joshua Timberman
41
+ - Copyright 2011-2015, Joshua Timberman <opensource@housepub.org>
42
+
43
+ Licensed under the Apache License, Version 2.0 (the "License");
44
+ you may not use this file except in compliance with the License.
45
+ You may obtain a copy of the License at
46
+
47
+ http://www.apache.org/licenses/LICENSE-2.0
48
+
49
+ Unless required by applicable law or agreed to in writing, software
50
+ distributed under the License is distributed on an "AS IS" BASIS,
51
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52
+ See the License for the specific language governing permissions and
53
+ limitations under the License.
@@ -18,9 +18,14 @@ require 'chef/handler'
18
18
  module SimpleReport
19
19
  class UpdatedResources < Chef::Handler
20
20
 
21
+ def initialize(line_prefix=" ")
22
+ super()
23
+ @line_prefix = line_prefix
24
+ end
25
+
21
26
  def report
22
27
  Chef::Log.info "Resources updated this run:"
23
- run_status.updated_resources.each {|r| Chef::Log.info " #{r.to_s}"}
28
+ run_status.updated_resources.each {|r| Chef::Log.info "#{line_prefix}#{r.to_s}"}
24
29
  end
25
30
  end
26
31
  end
metadata CHANGED
@@ -1,58 +1,46 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-updated-resources
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: "0.1"
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - Joshua Timberman
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2011-04-24 00:00:00 -06:00
14
- default_executable:
11
+ date: 2015-05-30 00:00:00.000000000 Z
15
12
  dependencies: []
16
-
17
13
  description: Chef report handler to display resources updated in the Chef Run
18
- email: chefcode@housepub.org
14
+ email: opensource@housepub.org
19
15
  executables: []
20
-
21
16
  extensions: []
22
-
23
17
  extra_rdoc_files: []
24
-
25
- files:
18
+ files:
26
19
  - LICENSE
27
20
  - README.md
28
21
  - lib/chef/handler/updated_resources.rb
29
- has_rdoc: true
30
22
  homepage: http://github.com/jtimberman/chef-handler-updated-resources
31
23
  licenses: []
32
-
24
+ metadata: {}
33
25
  post_install_message:
34
26
  rdoc_options: []
35
-
36
- require_paths:
27
+ require_paths:
37
28
  - lib
38
- required_ruby_version: !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
41
31
  - - ">="
42
- - !ruby/object:Gem::Version
43
- version: "0"
44
- required_rubygems_version: !ruby/object:Gem::Requirement
45
- none: false
46
- requirements:
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
47
36
  - - ">="
48
- - !ruby/object:Gem::Version
49
- version: "0"
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
50
39
  requirements: []
51
-
52
40
  rubyforge_project:
53
- rubygems_version: 1.5.2
41
+ rubygems_version: 2.4.4
54
42
  signing_key:
55
- specification_version: 3
43
+ specification_version: 4
56
44
  summary: Chef report handler to display resources updated in the Chef Run
57
45
  test_files: []
58
-
46
+ has_rdoc: