lib/metacrunch/cli.rb in metacrunch-3.0.0 vs lib/metacrunch/cli.rb in metacrunch-3.0.1

- old
+ new

@@ -37,16 +37,12 @@ say "You must provide exactly one job description file." else filename = File.expand_path(filenames.first) dir = File.dirname(filename) - setup_bundler(dir) - Dir.chdir(dir) do - contents = File.read(filename) - context = Metacrunch::Job.define(contents, filename: filename, args: job_args) - context.run + Metacrunch::Job.define(File.read(filename), filename: filename, args: job_args).run end end end end end @@ -57,18 +53,9 @@ end def job_args index = ARGV.index(ARGS_SEPERATOR) @job_args ||= index ? ARGV[index+1..-1] : nil - end - - def setup_bundler(dir) - ENV['BUNDLE_GEMFILE'] ||= File.join(dir, "Gemfile") - if File.exists?(ENV['BUNDLE_GEMFILE']) - puts "Using Gemfile `#{ENV['BUNDLE_GEMFILE']}`." - Bundler.setup - Bundler.require - end end end end