chef-journalist 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/README ADDED
File without changes
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "chef-journalist"
3
+ s.version = "0.0.1"
4
+ s.authors = ["Sean Porter"]
5
+ s.email = ["portertech@gmail.com"]
6
+ s.homepage = "https://github.com/portertech/chef-journalist"
7
+ s.summary = "An OpsCode Chef report handler for updated resources"
8
+ s.description = "An OpsCode Chef report handler for updated resources"
9
+ s.has_rdoc = false
10
+ s.license = "MIT"
11
+
12
+ s.rubyforge_project = "chef-journalist"
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.require_paths = ["lib"]
16
+ end
@@ -0,0 +1,22 @@
1
+ require 'rubygems'
2
+ require 'chef/handler'
3
+
4
+ module Chef
5
+ class Journalist < Chef::Handler
6
+
7
+ def initialize(resource_types=[])
8
+ Chef::Log.info "Generating updated resource report ..."
9
+ @resource_types = resource_types.map {|t| t.to_sym }
10
+ end
11
+
12
+ def report
13
+ updated_resources = case
14
+ when @resource_types.empty?
15
+ run_status.updated_resources
16
+ else
17
+ run_status.updated_resources.select {|r| @resource_types.include? r.resource_name }
18
+ end
19
+ updated_resources.each {|r| Chef::Log.info " #{r.to_s}" }
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chef-journalist
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Sean Porter
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-04-10 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: An OpsCode Chef report handler for updated resources
23
+ email:
24
+ - portertech@gmail.com
25
+ executables: []
26
+
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - README
35
+ - Rakefile
36
+ - chef-journalist.gemspec
37
+ - lib/chef-journalist.rb
38
+ has_rdoc: true
39
+ homepage: https://github.com/portertech/chef-journalist
40
+ licenses:
41
+ - MIT
42
+ post_install_message:
43
+ rdoc_options: []
44
+
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ hash: 3
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 3
62
+ segments:
63
+ - 0
64
+ version: "0"
65
+ requirements: []
66
+
67
+ rubyforge_project: chef-journalist
68
+ rubygems_version: 1.3.7
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: An OpsCode Chef report handler for updated resources
72
+ test_files: []
73
+