diff --git a/.gitignore b/.gitignore index 35f4062..0345637 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .idea/ .svn/ -lib/jasmine-*.js -dist/ \ No newline at end of file +dist/ +.DS_Store diff --git a/Rakefile b/Rakefile index f29053e..b902ece 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -require File.expand_path(File.join(File.dirname(__FILE__), "spec/jasmine_helper.rb")) - def jasmine_sources sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"] sources += Dir.glob('src/*.js').reject { |f| f == 'src/base.js' || sources.include?(f) }.sort @@ -10,10 +8,6 @@ def jasmine_html_sources ["src/html/TrivialReporter.js"] end -def jasmine_filename - "jasmine-#{jasmine_version}.js" -end - def jasmine_version "#{version_hash['major']}.#{version_hash['minor']}.#{version_hash['build']}" end @@ -23,19 +17,6 @@ def version_hash @version ||= JSON.parse(File.new("src/version.json").read); end -def start_jasmine_server(jasmine_includes = nil) - require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder")) - - puts "your tests are here:" - puts " http://localhost:8888/run.html" - - Jasmine::SimpleServer.start( - 8888, - lambda { JasmineHelper.specs }, - JasmineHelper.dir_mappings, - :jasmine_files => jasmine_includes) -end - task :default => 'jasmine:dist' def substitute_jasmine_version(filename) @@ -133,7 +114,7 @@ jasmine.version_= { FileUtils.rm_r temp_dir if File.exists?(temp_dir) Dir.mkdir(temp_dir) - root = JasmineHelper.jasmine_root + root = File.expand_path(File.dirname(__FILE__)) FileUtils.cp_r File.join(root, 'example/.'), File.join(temp_dir) substitute_jasmine_version(File.join(temp_dir, "SpecRunner.html")) @@ -154,47 +135,6 @@ jasmine.version_= { Dir.mkdir(dist_dir) exec "cd #{temp_dir} && zip -r #{zip_file_name} . -x .[a-zA-Z0-9]*" end - - - task :server do - files = jasmine_sources + jasmine_html_sources - jasmine_includes = lambda { - raw_jasmine_includes = files.collect { |f| File.expand_path(File.join(JasmineHelper.jasmine_root, f)) } - Jasmine.cachebust(raw_jasmine_includes).collect { |f| f.sub(JasmineHelper.jasmine_src_dir, "/src").sub(JasmineHelper.jasmine_lib_dir, "/lib") } - } - start_jasmine_server(jasmine_includes) - end - - task :server_build => 'jasmine:build' do - - start_jasmine_server - end - - namespace :test do - task :ci => :'ci:local' - namespace :ci do - - task :local => 'jasmine:build' do - require "spec" - require 'spec/rake/spectask' - Spec::Rake::SpecTask.new(:lambda_ci) do |t| - t.spec_opts = ["--color", "--format", "specdoc"] - t.spec_files = ["spec/jasmine_spec.rb"] - end - Rake::Task[:lambda_ci].invoke - end - - task :saucelabs => ['jasmine:copy_saucelabs_config', 'jasmine:build'] do - ENV['SAUCELABS'] = 'true' - Rake::Task['jasmine:test:ci:local'].invoke - end - end - end - - desc 'Copy saucelabs.yml to work directory' - task 'copy_saucelabs_config' do - FileUtils.cp '../saucelabs.yml', 'spec' - end end -task :jasmine => ['jasmine:server'] +task :jasmine => ['jasmine:dist'] diff --git a/doc/files.html b/doc/files.html index 7bb4757..52d1559 100644 --- a/doc/files.html +++ b/doc/files.html @@ -222,18 +222,6 @@ ul.inheritsList