Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent f8cd3a1 commit 95ca58e38c1ad94a91430fe2fc9286ac1e79df79 @hsbt hsbt committed Mar 7, 2011
Showing with 6 additions and 30 deletions.
  1. +1 −3 Capfile
  2. +5 −23 Rakefile
  3. +0 −4 config.ru
View
4 Capfile
@@ -1,4 +1,2 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
-Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
-
-load 'tdiary/deploy' # remove this line to skip loading any of the default tasks
+load 'tdiary/deploy'
View
28 Rakefile
@@ -20,40 +20,25 @@ CLOBBER.include(
task :default => [:spec, :test]
-desc "Run specs"
-task :spec do |t|
- Rake::Task["spec:all"].invoke
+desc 'Run the code in spec'
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = "spec/**/*_spec.rb"
end
namespace :spec do
- desc 'Run the code in spec'
- RSpec::Core::RakeTask.new(:all) do |t|
- t.pattern = "spec/**/*_spec.rb"
- end
-
%w(core plugin acceptance).each do |dir|
desc "Rub the code examples in spec/#{dir}"
RSpec::Core::RakeTask.new(dir.to_sym) do |t|
t.pattern = "spec/#{dir}/**/*_spec.rb"
end
end
- desc 'Run specs w/ RCov'
+ desc 'Run the code in specs with RCov'
RSpec::Core::RakeTask.new(:rcov) do |t|
t.pattern = "spec/**/*_spec.rb"
t.rcov = true
t.rcov_opts = IO.readlines(File.join('spec', 'rcov.opts')).map {|line| line.chomp.split(" ") }.flatten
end
- task :rcov => "coverage:clean"
-end
-
-namespace :coverage do
- desc "delete aggregate coverage data"
- task(:clean) {
- rm_f "coverage/*"
- mkdir "coverage" unless File.exist? "coverage"
- rm "coverage.aggregate" if File.exist? "coverage.aggregate"
- }
end
Rake::TestTask.new do |t|
@@ -62,11 +47,8 @@ Rake::TestTask.new do |t|
t.verbose = true
end
-desc "all coverage"
-task :coverage => ["coverage:clean", "spec:rcov"]
-
desc "generate rdoc files"
-task :docs do
+task :rdoc do
root_dir = File.dirname(__FILE__)
dirlist = Dir.glob(root_dir + "/rdoc/**/").sort {
View
4 config.ru
@@ -1,11 +1,7 @@
$:.unshift( File::dirname( __FILE__ ).untaint )
require 'tdiary/tdiary_application'
-# use Rack::ShowExceptions
-# use Rack::CommonLogger
-# use Rack::Lint
use Rack::Reloader
-
use Rack::Static, :urls => ["/theme"], :root => "."
use Rack::Static, :urls => ["/js"], :root => "."

0 comments on commit 95ca58e

Please sign in to comment.
Something went wrong with that request. Please try again.