cucumber-chef 2.1.0.rc.7 → 2.1.0.rc.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -165,7 +165,6 @@ module Cucumber
165
165
  mode :user
166
166
  prerelease (Cucumber::Chef.is_rc? ? true : false)
167
167
 
168
- provider :vagrant
169
168
  librarian_chef false
170
169
 
171
170
  user (ENV['OPSCODE_USER'] || ENV['USER'])
@@ -173,6 +172,18 @@ module Cucumber
173
172
  artifacts ({"chef-client-log" => "/var/log/chef/client.log",
174
173
  "chef-client-stacktrace" => "/var/chef/cache/chef-stacktrace.out"})
175
174
 
175
+ chef ({:version => "10.18.2",
176
+ :amqp_password => "p@ssw0rd1",
177
+ :admin_password => "p@ssw0rd1",
178
+ :render_client_rb => true})
179
+
180
+ test_lab ({:hostname => "cucumber-chef",
181
+ :tld => "test-lab"})
182
+
183
+ command_timeout (60 * 30)
184
+
185
+ provider :vagrant
186
+
176
187
  aws ({:lab_user => "ubuntu",
177
188
  :lxc_user => "root",
178
189
  :ubuntu_release => "precise",
@@ -184,15 +195,6 @@ module Cucumber
184
195
  vagrant ({:lab_user => "vagrant",
185
196
  :lxc_user => "root"})
186
197
 
187
- chef ({:version => "10.18.2",
188
- :amqp_password => "p@ssw0rd1",
189
- :admin_password => "p@ssw0rd1"})
190
-
191
- test_lab ({:hostname => "cucumber-chef",
192
- :tld => "test-lab"})
193
-
194
- command_timeout (60 * 30)
195
-
196
198
  ################################################################################
197
199
 
198
200
  end
@@ -55,7 +55,7 @@ module Cucumber::Chef::Helpers::ChefClient
55
55
  chef_config_client(name)
56
56
 
57
57
  logger.info { "Removing artifacts #{Cucumber::Chef::Config[:artifacts].values.collect{|z| "'#{z}'" }.join(' ')}." }
58
- (command_run_chroot(name, "/bin/rm -fv #{Cucumber::Chef::Config[:artifacts].values.join(' ')}") rescue nil)
58
+ (command_run_remote(name, "/bin/rm -fv #{Cucumber::Chef::Config[:artifacts].values.join(' ')}") rescue nil)
59
59
 
60
60
  logger.info { "Running chef client on container '#{name}'." }
61
61
 
@@ -70,7 +70,7 @@ module Cucumber::Chef::Helpers::ChefClient
70
70
 
71
71
  output = nil
72
72
  bm = ::Benchmark.realtime do
73
- output = command_run_chroot(name, ["/usr/bin/chef-client", arguments, args, "--once"].flatten.join(" "))
73
+ output = command_run_remote(name, ["/usr/bin/chef-client", arguments, args, "--once"].flatten.join(" "))
74
74
  end
75
75
  logger.info { "Chef client run on container '#{name}' took %0.4f seconds." % bm }
76
76
 
@@ -84,23 +84,23 @@ module Cucumber::Chef::Helpers::ChefClient
84
84
  client_rb = File.join("/", container_root(name), "etc/chef/client.rb")
85
85
  FileUtils.mkdir_p(File.dirname(client_rb))
86
86
 
87
- # Do not render out a chef-client config for now; we'll assume the user will
88
- # use a cookbook/recipe to accomplish this to their liking.
89
-
90
- # File.exists?(client_rb) && File.delete(client_rb)
91
-
92
- # max_key_size = @chef_client_config.keys.collect{ |z| z.to_s.size }.max
93
-
94
- # File.open(client_rb, 'w') do |f|
95
- # f.puts(Cucumber::Chef.generate_do_not_edit_warning("Chef Client Configuration"))
96
- # f.puts
97
- # @chef_client_config.merge(:node_name => name).each do |(key,value)|
98
- # next if value.nil?
99
- # f.puts("%-#{max_key_size}s %s" % [key, value.inspect])
100
- # end
101
- # f.puts
102
- # f.puts("Mixlib::Log::Formatter.show_time = true")
103
- # end
87
+ # render the chef-client client.rb if we are configured to
88
+ if Cucumber::Chef::Config.chef[:render_client_rb]
89
+ File.exists?(client_rb) && File.delete(client_rb)
90
+
91
+ max_key_size = @chef_client_config.keys.collect{ |z| z.to_s.size }.max
92
+
93
+ File.open(client_rb, 'w') do |f|
94
+ f.puts(Cucumber::Chef.generate_do_not_edit_warning("Chef Client Configuration"))
95
+ f.puts
96
+ @chef_client_config.merge(:node_name => name).each do |(key,value)|
97
+ next if value.nil?
98
+ f.puts("%-#{max_key_size}s %s" % [key, value.inspect])
99
+ end
100
+ f.puts
101
+ f.puts("Mixlib::Log::Formatter.show_time = true")
102
+ end
103
+ end
104
104
 
105
105
  attributes_json = File.join("/", container_root(name), "etc", "chef", "attributes.json")
106
106
  FileUtils.mkdir_p(File.dirname(attributes_json))
@@ -24,7 +24,7 @@ module Cucumber
24
24
 
25
25
  ################################################################################
26
26
 
27
- VERSION = "2.1.0.rc.7" unless const_defined?(:VERSION)
27
+ VERSION = "2.1.0.rc.8" unless const_defined?(:VERSION)
28
28
 
29
29
  ################################################################################
30
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.rc.7
4
+ version: 2.1.0.rc.8
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-04 00:00:00.000000000 Z
13
+ date: 2013-02-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: chef