ironfan 4.6.1 → 4.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v4.6.2:
2
+ * Added a -f/--with-facet option to knife cluster list
3
+
1
4
  # v4.6.1:
2
5
  * Fixes nested array bug when computing list of AZs for an ELB (thanks @nickmarden)
3
6
  * Cleaning up overzealous Elastic IP inclusion (alternative fix to #222, thanks @nickmarden)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.6.1
1
+ 4.6.2
data/ironfan.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ironfan"
8
- s.version = "4.6.1"
8
+ s.version = "4.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2012-12-11"
12
+ s.date = "2012-12-13"
13
13
  s.description = "Ironfan allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -27,23 +27,31 @@ class Chef
27
27
  require 'formatador'
28
28
  end
29
29
 
30
- banner "knife cluster list (options)"
31
-
30
+ banner 'knife cluster list (options)'
31
+
32
+ option :facets,
33
+ :long => '--with-facets',
34
+ :short => '-f',
35
+ :description => 'List cluster facets along with names and paths',
36
+ :default => false,
37
+ :boolean => true
38
+
32
39
  def run
33
40
  load_ironfan
34
41
  configure_dry_run
35
42
 
36
- hash = Ironfan.cluster_filenames
37
-
38
- table = []
39
- hash.keys.sort.each do |key|
40
- table.push( { :cluster => key, :path => hash[key] } )
43
+ data = Ironfan.cluster_filenames.map do |name, path|
44
+ as_table = { :cluster => name, :path => path }
45
+ if config[:facets]
46
+ facets = Ironfan.load_cluster(name).facets.to_a.map(&:name).join(', ')
47
+ as_table.merge!(:facets => facets)
48
+ end
49
+ as_table
41
50
  end
42
51
 
43
52
  ui.info "Cluster Path: #{ Ironfan.cluster_path.join ", " }"
44
-
45
- Formatador.display_compact_table(table, [:cluster,:path])
46
-
53
+ headers = config[:facets] ? [:cluster, :facets, :path] : [:cluster, :path]
54
+ Formatador.display_compact_table(data, headers)
47
55
  end
48
56
  end
49
57
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ironfan
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 4.6.1
5
+ version: 4.6.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Infochimps
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-12-11 00:00:00 Z
13
+ date: 2012-12-13 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: chef
@@ -282,7 +282,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - ">="
284
284
  - !ruby/object:Gem::Version
285
- hash: -1748752908376121561
285
+ hash: 4084772978397561372
286
286
  segments:
287
287
  - 0
288
288
  version: "0"