1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/Rakefile

54 lines
1.2 KiB
Text
Raw Normal View History

require 'rake/testtask'
require 'rubygems/package_task'
test_files = Dir.glob('test/**/*_test.rb')
2013-07-14 14:51:15 -04:00
desc "Default Task"
2009-09-13 13:42:13 -04:00
task :default => :test
# Run the unit tests
Rake::TestTask.new do |t|
t.libs << 'test'
# make sure we include the tests in alphabetical order as on some systems
# this will not happen automatically and the tests (as a whole) will error
t.test_files = test_files.sort
2008-09-10 14:03:32 -04:00
t.warning = true
2012-02-03 08:01:24 -05:00
t.verbose = true
t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION)
2008-09-10 14:03:32 -04:00
end
namespace :test do
task :isolated do
2013-07-14 14:51:15 -04:00
test_files.all? do |file|
sh(Gem.ruby, '-w', '-Ilib:test', file)
end or raise "Failures"
end
end
2011-09-22 07:52:52 -04:00
spec = eval(File.read('actionpack.gemspec'))
Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
2013-06-21 04:57:00 -04:00
desc "Release to rubygems"
task :release => :package do
require 'rake/gemcutter'
Rake::Gemcutter::Tasks.new(spec).define
Rake::Task['gem:push'].invoke
end
2010-02-04 21:28:45 -05:00
task :lines do
load File.expand_path('..', File.dirname(__FILE__)) + '/tools/line_statistics'
files = FileList["lib/**/*.rb"]
CodeTools::LineStatistics.new(files).print_loc
end
rule '.rb' => '.y' do |t|
sh "racc -l -o #{t.name} #{t.source}"
end
task compile: 'lib/action_dispatch/journey/parser.rb'