Permalink
Browse files

last modifications to use new newgem stuff

  • Loading branch information...
1 parent 5cf7432 commit 8f4a26b205cccec5bd58f70a38fb38376d300b51 @fabiokung committed Jun 25, 2009
Showing with 21 additions and 5 deletions.
  1. +2 −3 Rakefile
  2. +4 −0 lib/jetty_rails.rb
  3. +1 −1 lib/jetty_rails/jars.rb
  4. +1 −1 spec/spec_helper.rb
  5. +13 −0 tasks/rspec.rake
View
@@ -1,6 +1,6 @@
require 'rubygems' unless ENV['NO_RUBYGEMS']
%w[rake rake/clean fileutils newgem rubigen].each { |f| require f }
-require File.dirname(__FILE__) + '/lib/jetty-rails'
+require File.dirname(__FILE__) + '/lib/jetty_rails'
# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
@@ -27,5 +27,4 @@ end
require 'newgem/tasks' # load /tasks/*.rake
Dir['tasks/**/*.rake'].each { |t| load t }
-# TODO - want other tests/tasks run by default? Add them to the list
-# task :default => [:spec, :features]
+# task :default => :spec
View
@@ -1,3 +1,7 @@
+jetty_libs_dir = "#{File.dirname(__FILE__)}/../jetty-libs"
+$:.unshift(File.expand_path(jetty_libs_dir)) unless
+ $:.include?(jetty_libs_dir) || $:.include?(File.expand_path(jetty_libs_dir))
+
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
View
@@ -21,7 +21,7 @@ module Thread
end
end
- require "jruby-rack-0.9.4"
+ require "jruby-rack-0.9.5-SNAPSHOT"
module Rack
include_package "org.jruby.rack"
include_package "org.jruby.rack.rails"
View
@@ -8,5 +8,5 @@
$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../jetty-libs')
-require 'jetty-rails'
+require 'jetty_rails'
require 'yaml'
View
@@ -34,3 +34,16 @@ Spec::Rake::SpecTask.new('spec_report') do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.fail_on_error = false
end
+
+# credits to http://blog.jayfields.com/2008/02/rake-task-overwriting.html
+class Rake::Task
+ def overwrite(&block)
+ @actions.clear
+ prerequisites.clear
+ enhance(&block)
+ end
+end
+
+Rake::Task['test'].overwrite do
+ Rake::Task['spec'].invoke
+end

0 comments on commit 8f4a26b

Please sign in to comment.