From da1d3f9d44cce4f788a79cdfc575b88d476d80da Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Fri, 18 Jun 2010 13:55:48 -0400 Subject: [PATCH] removed incomplete file dump since it glitches for local workers and runners. patched to work with latest therubyracer --- Rakefile | 1 + lib/hydra/master.rb | 6 ------ lib/hydra/runner.rb | 2 +- test/runner_test.rb | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index 1b9f43f..235f063 100644 --- a/Rakefile +++ b/Rakefile @@ -13,6 +13,7 @@ begin gem.add_development_dependency "shoulda", "= 2.10.3" gem.add_development_dependency "rspec", "= 1.3.0" gem.add_development_dependency "cucumber", "= 0.7.2" + gem.add_development_dependency "therubyracer", "= 0.7.4" end Jeweler::GemcutterTasks.new rescue LoadError diff --git a/lib/hydra/master.rb b/lib/hydra/master.rb index 837d78f..5200a41 100644 --- a/lib/hydra/master.rb +++ b/lib/hydra/master.rb @@ -33,12 +33,6 @@ module Hydra #:nodoc: # * :autosort # * Set to false to disable automatic sorting by historical run-time per file def initialize(opts = { }) - trap("SIGINT") do - puts "Testing halted by user. Untested files:" - puts @incomplete_files.join("\n") - exit - end - opts.stringify_keys! config_file = opts.delete('config') { nil } if config_file diff --git a/lib/hydra/runner.rb b/lib/hydra/runner.rb index 30f1f25..e44eae2 100644 --- a/lib/hydra/runner.rb +++ b/lib/hydra/runner.rb @@ -187,7 +187,7 @@ module Hydra #:nodoc: } context['reportErrors'] = lambda{|js_errors| js_errors.each do |e| - e = V8::To.ruby(e) + e = V8::To.rb(e) errors << "\n\e[1;31mJSLINT: #{file}\e[0m" errors << " Error at line #{e['line'].to_i + 1} " + "character #{e['character'].to_i + 1}: \e[1;33m#{e['reason']}\e[0m" diff --git a/test/runner_test.rb b/test/runner_test.rb index 3bc8ce8..87786f0 100644 --- a/test/runner_test.rb +++ b/test/runner_test.rb @@ -40,13 +40,13 @@ class RunnerTest < Test::Unit::TestCase should "run a js lint file and find errors" do runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w')) results = runner.run_file(javascript_file) - assert results =~ /Missing semicolon/ + assert results =~ /Missing semicolon/, results end should "run a json data file and find errors" do runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w')) results = runner.run_file(json_file) - assert results =~ /trailing comma/ + assert results =~ /trailing comma/, results end should "run two rspec tests" do