nice-chef-formatter 0.0.1 → 0.0.2
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.
- data/README.md +2 -2
- data/lib/nice-chef-formatter.rb +9 -3
- data/nice-chef-formatter.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Nice Chef Formatter
|
2
2
|
===================
|
3
|
-
|
3
|
+
[]
|
4
4
|
Formatter for chef with execution times for every cookbook/recipe and simplified output.
|
5
5
|
|
6
6
|
Color codes:
|
@@ -39,4 +39,4 @@ License and Authors
|
|
39
39
|
===================
|
40
40
|
|
41
41
|
Author:: Nadir Lloret (<nadir.lloret@gmail.com>)
|
42
|
-
License:: Apache 2.0
|
42
|
+
License:: Apache 2.0
|
data/lib/nice-chef-formatter.rb
CHANGED
@@ -38,6 +38,7 @@ class Chef
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def cookbook_sync_start(cookbook_count)
|
41
|
+
@sync_start_time = Time.now.to_f
|
41
42
|
puts "Cookbook synchronization"
|
42
43
|
end
|
43
44
|
|
@@ -48,7 +49,8 @@ class Chef
|
|
48
49
|
|
49
50
|
# Called after all cookbooks have been sync'd.
|
50
51
|
def cookbook_sync_complete
|
51
|
-
|
52
|
+
sync_exec_time = Time.now.to_f - @sync_start_time
|
53
|
+
puts "Finish cookbook synchronization (#{sync_exec_time.round(3)} secs)"
|
52
54
|
end
|
53
55
|
|
54
56
|
def converge_start(run_context)
|
@@ -65,12 +67,16 @@ class Chef
|
|
65
67
|
puts "Compilation"
|
66
68
|
end
|
67
69
|
|
70
|
+
# Called right after ohai runs.
|
71
|
+
def ohai_completed(node)
|
72
|
+
puts "Ohai comleted"
|
73
|
+
end
|
74
|
+
|
68
75
|
def resource_action_start(resource, action, notification_type=nil, notifier=nil)
|
69
76
|
if resource.cookbook_name && resource.recipe_name
|
70
77
|
resource_recipe = "#{resource.cookbook_name}::#{resource.recipe_name}"
|
71
78
|
else
|
72
|
-
|
73
|
-
resource_recipe = "<wow, so much LWRP>"
|
79
|
+
resource_recipe = "#{resource.cookbook_name}"
|
74
80
|
end
|
75
81
|
|
76
82
|
if resource_recipe != @current_recipe
|
data/nice-chef-formatter.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "nice-chef-formatter"
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.2"
|
6
6
|
s.authors = ["Nadir Lloret"]
|
7
7
|
s.email = ["nadir.lloret@livedrive.com"]
|
8
8
|
s.homepage = "https://github.com/nadirollo/nice-chef-formatter"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nice-chef-formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|