cluster_chef 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
+ ## v3.0.6: schism of cookbooks and tools
1
2
 
2
-
3
+ * cookbooks all now live in [their own repo](https://github.com/infochimps-labs/cluster_chef-homebase), organized according to opscode standard.
4
+ * gem is now split into `cluster_chef` (the libraries) and `cluster_chef-knife` (the chef plugins)
5
+ * private_key was passing its block to super, with bad results
3
6
 
4
7
  ## Changes from v2 => v3 [2011 October]
5
8
 
data/Gemfile CHANGED
@@ -5,14 +5,21 @@ gem 'fog', "~> 1.1.1"
5
5
  gem 'formatador', "~> 0.2.1"
6
6
  gem 'gorillib', "~> 0.1.7"
7
7
 
8
- # Add dependencies to develop your gem here.
9
- # Include everything needed to run rake, tests, features, etc.
10
8
  group :development do
11
9
  gem 'bundler', "~> 1"
12
- gem 'yard', "~> 0.6.7"
13
- gem 'jeweler', "~> 1.6.4"
14
- gem 'rspec', "~> 2.7.0"
10
+ gem 'jeweler', "~> 1.6"
11
+ gem 'rspec', "~> 2.5"
12
+ gem 'yard', "~> 0.6"
15
13
  gem 'configliere', "~> 0.4.8"
16
- gem 'spork', "~> 0.9.0.rc5"
14
+ end
15
+
16
+ group :test do
17
+ gem 'spork', "~> 0.9.0.rc5", :platform => :mri
17
18
  gem 'watchr', "~> 0.7"
19
+ gem 'rcov', ">= 0.9.9"
20
+ end
21
+
22
+ group :support do
23
+ gem 'pry'
24
+ gem 'grit'
18
25
  end
data/Rakefile CHANGED
@@ -33,7 +33,8 @@ require 'rspec/core/rake_task'
33
33
  require 'yard'
34
34
 
35
35
  # Load constants from rake config file.
36
- Dir[File.join(File.dirname(__FILE__), 'tasks', '*.rb')].sort.each{|f| p f ; require f }
36
+ $LOAD_PATH.unshift('tasks')
37
+ Dir[File.join('tasks', '*.rake')].sort.each{|f| load(f) }
37
38
 
38
39
  $jeweler_push_from_branch = 'version_3'
39
40
 
@@ -41,31 +42,38 @@ $jeweler_push_from_branch = 'version_3'
41
42
  #
42
43
  # Jeweler -- release cluster_chef as a gem
43
44
  #
44
- Jeweler::Tasks.new do |gem|
45
- gem.name = ENV['CLUSTER_CHEF_NAME'] || "cluster_chef-knife"
46
- gem.homepage = "http://infochimps.com/labs"
47
- gem.license = NEW_COOKBOOK_LICENSE.to_s
48
- gem.summary = %Q{cluster_chef 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.}
49
- gem.description = %Q{cluster_chef 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.}
50
- gem.email = SSL_EMAIL_ADDRESS
51
- gem.authors = ["Infochimps"]
52
45
 
53
- ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
54
- dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
55
- gem.files = dotfiles + Dir["**/*"].
56
- reject{|f| f =~ %r{^cookbooks/} }.
57
- reject{|f| File.directory?(f) }.
58
- reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/*', f) || File.fnmatch(i+'/**/*', f) } }
59
- gem.test_files = gem.files.grep(/^spec\//)
60
- gem.require_paths = ['lib']
46
+ %w[ cluster_chef cluster_chef-knife ].each do |gem_name|
47
+ Jeweler::Tasks.new do |gem|
48
+ gem.name = gem_name
49
+ gem.version = File.read('VERSION')
50
+ gem.homepage = "http://infochimps.com/labs"
51
+ gem.license = NEW_COOKBOOK_LICENSE.to_s
52
+ gem.summary = %Q{cluster_chef 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.}
53
+ gem.description = %Q{cluster_chef 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.}
54
+ gem.email = SSL_EMAIL_ADDRESS
55
+ gem.authors = ["Infochimps"]
61
56
 
62
- if gem.name == 'cluster_chef'
63
- gem.files.reject!{|f| f =~ %r{^(cluster_chef-knife.gemspec|lib/chef/knife/)} }
64
- else
65
- gem.files.reject!{|f| f =~ %r{^(cluster_chef.gemspec|lib/cluster_chef)} }
57
+ ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
58
+ dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
59
+ gem.files = dotfiles + Dir["**/*"].
60
+ reject{|f| f =~ %r{^cookbooks/} }.
61
+ reject{|f| File.directory?(f) }.
62
+ reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/*', f) || File.fnmatch(i+'/**/*', f) } }
63
+ gem.test_files = gem.files.grep(/^spec\//)
64
+ gem.require_paths = ['lib']
65
+
66
+ if gem.name == 'cluster_chef'
67
+ gem.files.reject!{|f| f =~ %r{^(cluster_chef-knife.gemspec|lib/chef/knife/)} }
68
+ gem.add_runtime_dependency 'cluster_chef-knife', "= #{gem.version}"
69
+ elsif gem.name == 'cluster_chef-knife'
70
+ gem.files.reject!{|f| f =~ %r{^(cluster_chef.gemspec|lib/cluster_chef)} }
71
+ else
72
+ raise "Don't know what to include for gem #{gem.name}"
73
+ end
66
74
  end
75
+ Jeweler::RubygemsDotOrgTasks.new
67
76
  end
68
- Jeweler::RubygemsDotOrgTasks.new
69
77
 
70
78
  # ---------------------------------------------------------------------------
71
79
  #
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.0.6
data/cluster_chef.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cluster_chef"
8
- s.version = "3.0.5"
8
+ s.version = "3.0.6"
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 = "2011-12-11"
12
+ s.date = "2011-12-13"
13
13
  s.description = "cluster_chef 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 = [
@@ -60,8 +60,8 @@ Gem::Specification.new do |s|
60
60
  "spec/spec_helper.rb",
61
61
  "spec/spec_helper/dummy_chef.rb",
62
62
  "spec/test_config.rb",
63
- "tasks/chef_config.rb",
64
- "tasks/jeweler_use_alt_branch.rb"
63
+ "tasks/chef_config.rake",
64
+ "tasks/jeweler_use_alt_branch.rake"
65
65
  ]
66
66
  s.homepage = "http://infochimps.com/labs"
67
67
  s.licenses = ["apachev2"]
@@ -79,24 +79,22 @@ Gem::Specification.new do |s|
79
79
  s.add_runtime_dependency(%q<formatador>, ["~> 0.2.1"])
80
80
  s.add_runtime_dependency(%q<gorillib>, ["~> 0.1.7"])
81
81
  s.add_development_dependency(%q<bundler>, ["~> 1"])
82
- s.add_development_dependency(%q<yard>, ["~> 0.6.7"])
83
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
84
- s.add_development_dependency(%q<rspec>, ["~> 2.7.0"])
82
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
83
+ s.add_development_dependency(%q<rspec>, ["~> 2.5"])
84
+ s.add_development_dependency(%q<yard>, ["~> 0.6"])
85
85
  s.add_development_dependency(%q<configliere>, ["~> 0.4.8"])
86
- s.add_development_dependency(%q<spork>, ["~> 0.9.0.rc5"])
87
- s.add_development_dependency(%q<watchr>, ["~> 0.7"])
86
+ s.add_runtime_dependency(%q<cluster_chef-knife>, ["= 3.0.6"])
88
87
  else
89
88
  s.add_dependency(%q<chef>, ["~> 0.10.4"])
90
89
  s.add_dependency(%q<fog>, ["~> 1.1.1"])
91
90
  s.add_dependency(%q<formatador>, ["~> 0.2.1"])
92
91
  s.add_dependency(%q<gorillib>, ["~> 0.1.7"])
93
92
  s.add_dependency(%q<bundler>, ["~> 1"])
94
- s.add_dependency(%q<yard>, ["~> 0.6.7"])
95
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
96
- s.add_dependency(%q<rspec>, ["~> 2.7.0"])
93
+ s.add_dependency(%q<jeweler>, ["~> 1.6"])
94
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
95
+ s.add_dependency(%q<yard>, ["~> 0.6"])
97
96
  s.add_dependency(%q<configliere>, ["~> 0.4.8"])
98
- s.add_dependency(%q<spork>, ["~> 0.9.0.rc5"])
99
- s.add_dependency(%q<watchr>, ["~> 0.7"])
97
+ s.add_dependency(%q<cluster_chef-knife>, ["= 3.0.6"])
100
98
  end
101
99
  else
102
100
  s.add_dependency(%q<chef>, ["~> 0.10.4"])
@@ -104,12 +102,11 @@ Gem::Specification.new do |s|
104
102
  s.add_dependency(%q<formatador>, ["~> 0.2.1"])
105
103
  s.add_dependency(%q<gorillib>, ["~> 0.1.7"])
106
104
  s.add_dependency(%q<bundler>, ["~> 1"])
107
- s.add_dependency(%q<yard>, ["~> 0.6.7"])
108
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
109
- s.add_dependency(%q<rspec>, ["~> 2.7.0"])
105
+ s.add_dependency(%q<jeweler>, ["~> 1.6"])
106
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
107
+ s.add_dependency(%q<yard>, ["~> 0.6"])
110
108
  s.add_dependency(%q<configliere>, ["~> 0.4.8"])
111
- s.add_dependency(%q<spork>, ["~> 0.9.0.rc5"])
112
- s.add_dependency(%q<watchr>, ["~> 0.7"])
109
+ s.add_dependency(%q<cluster_chef-knife>, ["= 3.0.6"])
113
110
  end
114
111
  end
115
112
 
@@ -6,24 +6,15 @@
6
6
 
7
7
  <%= long_description.present? ? long_description : description %>
8
8
 
9
- ## Attributes
10
-
11
- <%- all_attributes.attrs.each do |attrib| %>
12
- * <%= "%-35s" % ('`'+attrib.bracketed_name+'`') %> - <%= attrib.display_name %><%- if attrib.default.is_a?(String) || attrib.default.is_a?(Symbol) %> (default: <%= attrib.default.inspect %>)<%- end %>
13
- <%- if attrib.description.present? && (attrib.description != attrib.display_name) %>
14
- - <%= attrib.description.gsub(/\n/, "\n ") %>
15
- <%- end %>
16
- <%- end %>
17
9
  <%- if components[:recipes].present? %>
18
-
19
10
  ## Recipes
20
11
 
21
12
  <%- components[:recipes].each do |recipe| %>
22
13
  * <%= "%-26s" % ('`'+recipe.name+'`') %> - <%= recipe.desc %>
23
14
  <%- end %>
24
15
  <%- end %>
25
- <%- if all_resources.present? %>
26
16
 
17
+ <%- if all_resources.present? %>
27
18
  ## Resources / Providers
28
19
 
29
20
  <%- end %>
@@ -37,6 +28,15 @@ Cookbook dependencies:
37
28
  * <%= dep.gsub(/"/, '') %>
38
29
  <%- end -%><%- end -%>
39
30
 
31
+ ## Attributes
32
+
33
+ <%- all_attributes.attrs.each do |attrib| %>
34
+ * <%= "%-35s" % ('`'+attrib.bracketed_name+'`') %> - <%= attrib.display_name %><%- if attrib.default.is_a?(String) || attrib.default.is_a?(Symbol) %> (default: <%= attrib.default.inspect %>)<%- end %>
35
+ <%- if attrib.description.present? && (attrib.description != attrib.display_name) %>
36
+ - <%= attrib.description.gsub(/\n/, "\n ") %>
37
+ <%- end %>
38
+ <%- end %>
39
+
40
40
  ## License and Author
41
41
 
42
42
  Author:: <%= maintainer %> (<<%= maintainer_email %>>)
@@ -46,8 +46,9 @@ module ClusterChef
46
46
  class_attribute :keys
47
47
  self.keys = []
48
48
 
49
- def initialize(attrs={})
50
- @settings = attrs.to_mash || Mash.new
49
+ def initialize(attrs={}, &block)
50
+ @settings = Mash.new
51
+ configure(attrs, &block)
51
52
  end
52
53
 
53
54
  #
@@ -16,7 +16,6 @@ module ClusterChef
16
16
  # @yield a block, executed in caller's context, when the body is updated
17
17
  # @yieldparam the updated body
18
18
  def initialize(name, proxy=nil, &on_update)
19
- super()
20
19
  @name = name
21
20
  @proxy = proxy
22
21
  @on_update = on_update
File without changes
@@ -7,16 +7,19 @@
7
7
  module Jeweler::Commands
8
8
 
9
9
  PUSH_FROM_BRANCH = 'version_3' unless defined?(PUSH_FROM_BRANCH)
10
-
10
+
11
11
  ReleaseToGit.class_eval do
12
12
  def run
13
+ branch = PUSH_FROM_BRANCH
14
+ remote = 'origin'
15
+
13
16
  unless clean_staging_area?
14
17
  system "git status"
15
18
  raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
16
19
  end
17
20
 
18
- repo.checkout(PUSH_FROM_BRANCH)
19
- repo.push
21
+ repo.checkout(branch)
22
+ repo.push(remote, branch)
20
23
 
21
24
  if release_not_tagged?
22
25
  output.puts "Tagging #{release_tag}"
@@ -27,21 +30,24 @@ module Jeweler::Commands
27
30
  end
28
31
  end
29
32
  end
30
-
33
+
31
34
  ReleaseGemspec.class_eval do
32
35
  def run
36
+ branch = PUSH_FROM_BRANCH
37
+ remote = 'origin'
38
+
33
39
  unless clean_staging_area?
34
40
  system "git status"
35
41
  raise "Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above."
36
42
  end
37
43
 
38
- repo.checkout(PUSH_FROM_BRANCH)
44
+ repo.checkout(branch)
39
45
 
40
46
  regenerate_gemspec!
41
47
  commit_gemspec! if gemspec_changed?
42
48
 
43
- output.puts "Pushing #{PUSH_FROM_BRANCH} to origin"
44
- repo.push
49
+ output.puts "Pushing #{branch} to origin"
50
+ repo.push(remote, branch)
45
51
  end
46
52
  end
47
53
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cluster_chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-11 00:00:00.000000000 Z
12
+ date: 2011-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &70325818912360 !ruby/object:Gem::Requirement
16
+ requirement: &70143371909080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70325818912360
24
+ version_requirements: *70143371909080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fog
27
- requirement: &70325818911800 !ruby/object:Gem::Requirement
27
+ requirement: &70143371907660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70325818911800
35
+ version_requirements: *70143371907660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: formatador
38
- requirement: &70325819294520 !ruby/object:Gem::Requirement
38
+ requirement: &70143371907180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70325819294520
46
+ version_requirements: *70143371907180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: gorillib
49
- requirement: &70325819294040 !ruby/object:Gem::Requirement
49
+ requirement: &70143371906580 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.1.7
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70325819294040
57
+ version_requirements: *70143371906580
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70325819293560 !ruby/object:Gem::Requirement
60
+ requirement: &70143371906080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,73 +65,62 @@ dependencies:
65
65
  version: '1'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70325819293560
69
- - !ruby/object:Gem::Dependency
70
- name: yard
71
- requirement: &70325819293060 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ~>
75
- - !ruby/object:Gem::Version
76
- version: 0.6.7
77
- type: :development
78
- prerelease: false
79
- version_requirements: *70325819293060
68
+ version_requirements: *70143371906080
80
69
  - !ruby/object:Gem::Dependency
81
70
  name: jeweler
82
- requirement: &70325819292540 !ruby/object:Gem::Requirement
71
+ requirement: &70143371905600 !ruby/object:Gem::Requirement
83
72
  none: false
84
73
  requirements:
85
74
  - - ~>
86
75
  - !ruby/object:Gem::Version
87
- version: 1.6.4
76
+ version: '1.6'
88
77
  type: :development
89
78
  prerelease: false
90
- version_requirements: *70325819292540
79
+ version_requirements: *70143371905600
91
80
  - !ruby/object:Gem::Dependency
92
81
  name: rspec
93
- requirement: &70325819292060 !ruby/object:Gem::Requirement
82
+ requirement: &70143371905060 !ruby/object:Gem::Requirement
94
83
  none: false
95
84
  requirements:
96
85
  - - ~>
97
86
  - !ruby/object:Gem::Version
98
- version: 2.7.0
87
+ version: '2.5'
99
88
  type: :development
100
89
  prerelease: false
101
- version_requirements: *70325819292060
90
+ version_requirements: *70143371905060
102
91
  - !ruby/object:Gem::Dependency
103
- name: configliere
104
- requirement: &70325819291520 !ruby/object:Gem::Requirement
92
+ name: yard
93
+ requirement: &70143371904420 !ruby/object:Gem::Requirement
105
94
  none: false
106
95
  requirements:
107
96
  - - ~>
108
97
  - !ruby/object:Gem::Version
109
- version: 0.4.8
98
+ version: '0.6'
110
99
  type: :development
111
100
  prerelease: false
112
- version_requirements: *70325819291520
101
+ version_requirements: *70143371904420
113
102
  - !ruby/object:Gem::Dependency
114
- name: spork
115
- requirement: &70325819291020 !ruby/object:Gem::Requirement
103
+ name: configliere
104
+ requirement: &70143371903880 !ruby/object:Gem::Requirement
116
105
  none: false
117
106
  requirements:
118
107
  - - ~>
119
108
  - !ruby/object:Gem::Version
120
- version: 0.9.0.rc5
109
+ version: 0.4.8
121
110
  type: :development
122
111
  prerelease: false
123
- version_requirements: *70325819291020
112
+ version_requirements: *70143371903880
124
113
  - !ruby/object:Gem::Dependency
125
- name: watchr
126
- requirement: &70325819290540 !ruby/object:Gem::Requirement
114
+ name: cluster_chef-knife
115
+ requirement: &70143371903340 !ruby/object:Gem::Requirement
127
116
  none: false
128
117
  requirements:
129
- - - ~>
118
+ - - =
130
119
  - !ruby/object:Gem::Version
131
- version: '0.7'
132
- type: :development
120
+ version: 3.0.6
121
+ type: :runtime
133
122
  prerelease: false
134
- version_requirements: *70325819290540
123
+ version_requirements: *70143371903340
135
124
  description: cluster_chef allows you to orchestrate not just systems but clusters
136
125
  of machines. It includes a powerful layer on top of knife and a collection of cloud
137
126
  cookbooks.
@@ -185,8 +174,8 @@ files:
185
174
  - spec/spec_helper.rb
186
175
  - spec/spec_helper/dummy_chef.rb
187
176
  - spec/test_config.rb
188
- - tasks/chef_config.rb
189
- - tasks/jeweler_use_alt_branch.rb
177
+ - tasks/chef_config.rake
178
+ - tasks/jeweler_use_alt_branch.rake
190
179
  homepage: http://infochimps.com/labs
191
180
  licenses:
192
181
  - apachev2
@@ -202,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
191
  version: '0'
203
192
  segments:
204
193
  - 0
205
- hash: 3687247056688648988
194
+ hash: -3562653573573692445
206
195
  required_rubygems_version: !ruby/object:Gem::Requirement
207
196
  none: false
208
197
  requirements: