From d24e41198c3b741d302a07050eafa8f5fb7e55bf Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 6 May 2011 14:16:25 -0400 Subject: [PATCH] remove our distribution of jasmine and use the gem --- .gitmodules | 3 --- bin/jasmine-headless-webkit | 10 +++++++--- jasmine | 1 - jasmine-headless-webkit.gemspec | 1 + lib/jasmine/cli.rb | 2 +- spec/lib/jasmine/cli_spec.rb | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 .gitmodules delete mode 160000 jasmine diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 71ef4f1..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "jasmine"] - path = jasmine - url = https://github.com/pivotal/jasmine.git diff --git a/bin/jasmine-headless-webkit b/bin/jasmine-headless-webkit index 2107c55..edcad4e 100755 --- a/bin/jasmine-headless-webkit +++ b/bin/jasmine-headless-webkit @@ -7,6 +7,8 @@ require 'yaml' require 'fileutils' require 'getoptlong' +require 'rubygems' +require 'jasmine' require 'jasmine/cli' include Jasmine::CLI @@ -44,9 +46,8 @@ end puts "Running Jasmine specs..." files = [ - 'file://' + File.join(gem_dir, 'jasmine/lib/jasmine.js'), - 'file://' + File.join(gem_dir, 'jasmine/lib/jasmine-html.js'), - 'file://' + File.join(gem_dir, 'jasmine/lib/jasmine.css') + 'file://' + File.join(Jasmine.root, 'lib/jasmine.js'), + 'file://' + File.join(Jasmine.root, 'lib/jasmine-html.js'), ] files += [ [ 'src_files', 'src_dir' ], [ 'stylesheets', 'src_dir' ], [ 'helpers', 'spec_dir' ], [ 'spec_files', 'spec_dir' ] ].collect do |searches, root| @@ -57,11 +58,14 @@ files += [ [ 'src_files', 'src_dir' ], [ 'stylesheets', 'src_dir' ], [ 'helpers' data[searches].collect do |search| path = search path = File.join(data[root], path) if data[root] + p path Dir[path] end end end +p files + files = files.flatten.compact.collect { |file| case File.extname(file) when '.js' diff --git a/jasmine b/jasmine deleted file mode 160000 index e826fbb..0000000 --- a/jasmine +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e826fbb17088f9e31a570ac4e09a738592af7b30 diff --git a/jasmine-headless-webkit.gemspec b/jasmine-headless-webkit.gemspec index ced024c..47020bd 100644 --- a/jasmine-headless-webkit.gemspec +++ b/jasmine-headless-webkit.gemspec @@ -21,4 +21,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency 'jasmine' + s.add_dependency 'coffee-script-source' end diff --git a/lib/jasmine/cli.rb b/lib/jasmine/cli.rb index dd5d761..1d38187 100644 --- a/lib/jasmine/cli.rb +++ b/lib/jasmine/cli.rb @@ -4,7 +4,7 @@ module Jasmine 'spec_files' => [ '**/*[sS]pec.js' ], 'helpers' => [ 'helpers/**/*.js' ], 'spec_dir' => 'spec/javascripts', - 'src_dir' => '', + 'src_dir' => nil, 'stylesheets' => [], 'src_files' => [] } diff --git a/spec/lib/jasmine/cli_spec.rb b/spec/lib/jasmine/cli_spec.rb index 62322c9..4296b9e 100644 --- a/spec/lib/jasmine/cli_spec.rb +++ b/spec/lib/jasmine/cli_spec.rb @@ -14,7 +14,7 @@ describe Jasmine::CLI do 'stylesheets' => [], 'helpers' => [ 'helpers/**/*.js' ], 'spec_files' => [ '**/*[sS]pec.js' ], - 'src_dir' => '', + 'src_dir' => nil, 'spec_dir' => 'spec/javascripts' } end