Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added a sort to the list of nodes to make future comparisons easier #2

Merged
merged 1 commit into from

2 participants

@aglarond

No description provided.

@jbz jbz merged commit 78a6566 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 18, 2013
  1. @aglarond
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/chef/knife/audit.rb
View
6 lib/chef/knife/audit.rb
@@ -200,7 +200,7 @@ def format_cookbook_runlist_list_for_display(item)
key_length = item.empty? ? 0 : item.keys.map {|name| name.size }.max + 2
if config[:show_nodelist]
item.sort.map do |name, cookbook|
- "#{name.ljust(key_length)} #{cookbook["count"]} [ #{cookbook["nodes"].join(' ')} ]"
+ "#{name.ljust(key_length)} #{cookbook["count"]} [ #{cookbook["nodes"].sort.join(' ')} ]"
end
else
item.sort.map do |name, cookbook|
@@ -214,7 +214,7 @@ def format_cookbook_seenlist_list_for_display(item)
key_length = item.empty? ? 0 : item.keys.map {|name| name.size }.max + 2
if config[:show_nodelist]
item.sort.map do |name, cookbook|
- "#{name.ljust(key_length)} #{cookbook["seen_recipe_count"]} [ #{cookbook["seen_recipe_nodes"].join(' ')} ]"
+ "#{name.ljust(key_length)} #{cookbook["seen_recipe_count"]} [ #{cookbook["seen_recipe_nodes"].sort.join(' ')} ]"
end
else
item.sort.map do |name, cookbook|
@@ -230,7 +230,7 @@ def format_cookbook_totallist_list_for_display(item)
item.sort.map do |name, cookbook|
cookbook_display = (cookbook["seen_recipe_nodes"] + cookbook["nodes"]).uniq
cookbook_count = cookbook["seen_recipe_count"] + cookbook["count"]
- "#{name.ljust(key_length)} #{cookbook_count} [ #{cookbook_display.join(' ')} ]"
+ "#{name.ljust(key_length)} #{cookbook_count} [ #{cookbook_display.sort.join(' ')} ]"
end
else
item.sort.map do |name, cookbook|
Something went wrong with that request. Please try again.