2009-12-28 18:08:23 +00:00
|
|
|
require "#{File.dirname(__FILE__)}/vendor/gems/environment"
|
|
|
|
Bundler.require_env :rake
|
|
|
|
|
|
|
|
$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/lib")
|
|
|
|
|
|
|
|
require 'spec'
|
|
|
|
require 'spec/rake/spectask'
|
|
|
|
|
|
|
|
desc "Run all examples"
|
|
|
|
Spec::Rake::SpecTask.new('spec') do |t|
|
|
|
|
t.spec_files = FileList['spec/**/*.rb']
|
|
|
|
end
|
|
|
|
|
|
|
|
namespace :jasmine do
|
|
|
|
# require 'jasmine'
|
2009-12-28 20:00:02 +00:00
|
|
|
require 'spec/jasmine_self_test_config'
|
2009-12-28 18:08:23 +00:00
|
|
|
|
|
|
|
# desc "Run continuous integration tests"
|
|
|
|
# require "spec"
|
|
|
|
# require 'spec/rake/spectask'
|
|
|
|
# Spec::Rake::SpecTask.new(:ci) do |t|
|
|
|
|
# t.spec_opts = ["--color", "--format", "specdoc"]
|
|
|
|
# t.verbose = true
|
|
|
|
# t.spec_files = [JasmineHelper.meta_spec_path]
|
|
|
|
# end
|
|
|
|
|
|
|
|
task :server do
|
|
|
|
puts "your tests are here:"
|
|
|
|
puts " http://localhost:8888/run.html"
|
|
|
|
|
2009-12-28 20:00:02 +00:00
|
|
|
JasmineSelfTestConfig.new.start_server
|
2009-12-28 18:08:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Run specs via server"
|
|
|
|
task :jasmine => ['jasmine:server']
|
|
|
|
|
|
|
|
|
2009-10-11 00:44:59 +00:00
|
|
|
namespace :jeweler do
|
|
|
|
|
2009-12-28 18:08:23 +00:00
|
|
|
unless File.exists?('jasmine/lib')
|
|
|
|
raise "Jasmine submodule isn't present. Run git submodule init && git submodule update."
|
2009-10-11 00:44:59 +00:00
|
|
|
end
|
2009-12-28 18:08:23 +00:00
|
|
|
|
2009-10-11 00:44:59 +00:00
|
|
|
begin
|
|
|
|
require 'jeweler'
|
2009-10-31 06:56:05 +00:00
|
|
|
require 'rake'
|
2009-10-11 00:44:59 +00:00
|
|
|
Jeweler::Tasks.new do |gemspec|
|
2009-12-31 17:47:52 +00:00
|
|
|
gemspec.name = "jasmine"
|
|
|
|
gemspec.summary = "Jasmine Ruby Runner"
|
|
|
|
gemspec.description = "Javascript BDD test framework"
|
2009-10-11 00:44:59 +00:00
|
|
|
gemspec.email = "ragaskar@gmail.com"
|
2009-12-31 17:47:52 +00:00
|
|
|
gemspec.homepage = "http://github.com/pivotal/jasmine-ruby"
|
|
|
|
gemspec.authors = ["Rajan Agaskar", "Christian Williams"]
|
|
|
|
gemspec.files = FileList.new('bin/jasmine', 'lib/**/**', 'jasmine/lib/**', 'jasmine/contrib/ruby/**', 'tasks/**', 'templates/**')
|
2009-11-26 17:11:25 +00:00
|
|
|
gemspec.add_dependency('rspec', '>= 1.1.5')
|
2009-12-05 21:06:34 +00:00
|
|
|
gemspec.add_dependency('json', '>= 1.1.9')
|
2009-12-31 17:47:52 +00:00
|
|
|
gemspec.add_dependency('rack', '>= 1.0.0')
|
|
|
|
gemspec.add_dependency('thin', '>= 1.2.4')
|
|
|
|
gemspec.add_dependency('selenium-rc', '>=2.1.0')
|
|
|
|
gemspec.add_dependency('selenium-client', '>=1.2.17')
|
2009-10-11 00:44:59 +00:00
|
|
|
end
|
|
|
|
Jeweler::GemcutterTasks.new
|
|
|
|
end
|
|
|
|
end
|