From ae298cf409400cd15a105a0cb757dbb95865ff07 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 14 Mar 2012 09:51:45 -0700 Subject: [PATCH] Update rake tasks to use arguments --- Rakefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index aa641d65b..edee52d5b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -$ATOM_ENV = [] +$ATOM_ARGS = [] ENV['PATH'] = "#{ENV['PATH']}:/usr/local/bin/" BUILD_DIR = 'atom-build' @@ -21,8 +21,7 @@ task :run => :build do else app_path = "#{applications.first}/Contents/MacOS/Atom" if File.exists?(app_path) - puts "#{$ATOM_ENV.join(' ')} #{applications.first}/Contents/MacOS/Atom" - output = `#{applications.first}/Contents/MacOS/Atom --benchmark` + output = `#{applications.first}/Contents/MacOS/Atom #{$ATOM_ARGS.join(' ')}` puts output else $stderr.puts "Executable `#{app_path}` not found." @@ -30,9 +29,15 @@ task :run => :build do end end +desc "Run the specs" +task :test do + $ATOM_ARGS.push "--test" + Rake::Task["run"].invoke +end + desc "Run the benchmarks" task :benchmark do - $ATOM_ENV.push "RUN_BENCHMARKS=1" + $ATOM_ARGS.push "--benchmark" Rake::Task["run"].invoke end