bin/cc-knife in cucumber-chef-2.0.7 vs bin/cc-knife in cucumber-chef-2.1.0.rc.0
- old
+ new
@@ -1,22 +1,19 @@
#!/usr/bin/env ruby
require 'cucumber-chef'
-$logger = ZTK::Logger.new(Cucumber::Chef.log_file)
-Cucumber::Chef.is_rc? and ($logger.level = ZTK::Logger::DEBUG)
-
# if we have bundler binstubs use that; otherwise attempt to detect
knife = (Cucumber::Chef.locate(:file, "bin", "knife") rescue nil)
knife = "/usr/bin/env knife" unless knife
message = "cc-knife v#{Cucumber::Chef::VERSION}"
puts(message)
-$logger.info { message }
+Cucumber::Chef.logger.info { message }
Cucumber::Chef::Config.load
if (test_lab = Cucumber::Chef::TestLab.new) && (test_lab.labs_running.count > 0)
- knife_rb = Cucumber::Chef.locate(:file, ".cucumber-chef", "knife.rb")
+ knife_rb = Cucumber::Chef.knife_rb
if File.exists?(knife_rb)
command = [knife, ARGV, "--server-url http://#{test_lab.labs_running.first.public_ip_address}:4000", "--config #{knife_rb}", "2>&1"].flatten.compact.join(" ")
puts(command)
puts(%x(#{command}))
exit($?.to_i)