class Cucumber::Rake::Task::ForkedCucumberRunner
:nodoc:
def cmd
def cmd if use_bundler [ RUBY, '-S', 'bundle', 'exec', 'cucumber', @cucumber_opts, @feature_files ].flatten else [ RUBY, '-I', load_path(@libs), quoted_binary(@cucumber_bin), @cucumber_opts, @feature_files ].flatten end end
def initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files)
def initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files) @libs = libs @cucumber_bin = cucumber_bin @cucumber_opts = cucumber_opts @bundler = bundler @feature_files = feature_files end
def load_path(libs)
def load_path(libs) ['"%s"' % @libs.join(File::PATH_SEPARATOR)] end
def quoted_binary(cucumber_bin)
def quoted_binary(cucumber_bin) ['"%s"' % cucumber_bin] end
def run
def run sh(cmd.join(" ")) end
def use_bundler
def use_bundler @bundler.nil? ? File.exist?("./Gemfile") && Gem.available?("bundler") : @bundler end