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