lib/testlab.rb in testlab-0.6.6 vs lib/testlab.rb in testlab-0.6.7

- old
+ new

@@ -1,5 +1,7 @@ +require 'socket' + require 'ztk' require 'active_support/inflector' require 'testlab/version' require 'testlab/monkeys' @@ -99,11 +101,11 @@ include TestLab::Utility::Misc def initialize(options={}) self.ui = (options[:ui] || ZTK::UI.new) - labfile = (options[:labfile] || 'Labfile') + labfile = (options[:labfile] || File.join(Dir.pwd, 'Labfile')) labfile_path = ZTK::Locator.find(labfile) @labfile = TestLab::Labfile.load(labfile_path) @labfile.config.merge!(:testlab => self) end @@ -293,10 +295,11 @@ # Returns the path to the test lab configuration directory which is located # off the repo directory under '.testlab'. # # @return [String] The path to the TestLab configuration directory. def config_dir - directory = File.join(self.config[:repo], '.testlab') + @hostname ||= Socket.gethostname.split('.').first.strip + directory = File.join(self.config[:repo], ".testlab-#{@hostname}") File.expand_path(directory, File.dirname(__FILE__)) end # Provider Method Handler #