bin/cc-knife in cucumber-chef-2.1.0.rc.2 vs bin/cc-knife in cucumber-chef-2.1.0.rc.3
- old
+ new
@@ -1,17 +1,16 @@
#!/usr/bin/env ruby
require 'cucumber-chef'
# 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
+knife = (Cucumber::Chef.locate(:file, "bin", "knife") rescue "/usr/bin/env knife")
message = "cc-knife v#{Cucumber::Chef::VERSION}"
puts(message)
Cucumber::Chef.logger.info { message }
Cucumber::Chef::Config.load
-if (test_lab = Cucumber::Chef::TestLab.new) && (test_lab.labs_running.count > 0)
+if (test_lab = Cucumber::Chef::TestLab.new) && test_lab.alive?
knife_rb = Cucumber::Chef.knife_rb
if File.exists?(knife_rb)
command = [knife, ARGV, "--server-url http://#{test_lab.ip}:4000", "--config #{knife_rb}", "2>&1"].flatten.compact.join(" ")
puts(command)