2010-10-26 14:24:45 +00:00
|
|
|
require 'rubygems'
|
|
|
|
require 'bundler'
|
|
|
|
|
|
|
|
Bundler.require(:default)
|
|
|
|
|
2010-04-27 20:11:47 +00:00
|
|
|
$LOAD_PATH << 'lib'
|
|
|
|
|
2010-09-15 22:05:34 +00:00
|
|
|
require 'yaml'
|
2010-05-18 16:43:57 +00:00
|
|
|
|
2010-04-27 20:11:47 +00:00
|
|
|
require 'apache'
|
2010-10-26 14:24:45 +00:00
|
|
|
require 'rspec/core/rake_task'
|
2010-04-27 20:11:47 +00:00
|
|
|
|
|
|
|
namespace :apache do
|
|
|
|
desc "Generate the configs"
|
|
|
|
task :generate, :path do |t, args|
|
|
|
|
Dir[File.join(args[:path], '**', '*.rb')].each do |file|
|
|
|
|
require file
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-05-04 15:48:59 +00:00
|
|
|
|
|
|
|
namespace :spec do
|
|
|
|
desc "Run RCov tests"
|
2010-10-26 14:24:45 +00:00
|
|
|
RSpec::Core::RakeTask.new(:rcov) do |t|
|
|
|
|
t.pattern = 'spec/*.rb'
|
2010-05-04 15:48:59 +00:00
|
|
|
t.rcov = true
|
2010-05-04 21:04:44 +00:00
|
|
|
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems']
|
2010-10-26 14:24:45 +00:00
|
|
|
t.rspec_opts = ['-b']
|
2010-05-04 15:48:59 +00:00
|
|
|
end
|
|
|
|
end
|
2010-05-10 19:57:34 +00:00
|
|
|
|
2010-05-18 16:43:57 +00:00
|
|
|
task :reek do
|
2010-05-18 21:43:23 +00:00
|
|
|
system('reek -c config/config.reek lib/*')
|
2010-05-18 16:43:57 +00:00
|
|
|
end
|