Rakefile in lapidary-0.1.2 vs Rakefile in lapidary-0.2.0

- old
+ new

@@ -23,10 +23,11 @@ gem.authors = ["Kenji Hara"] # dependencies defined in Gemfile end Jeweler::RubygemsDotOrgTasks.new +## RSpec require "rspec/core" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList["spec/**/*_spec.rb"] end @@ -34,24 +35,33 @@ RSpec::Core::RakeTask.new(:rcov) do |spec| spec.pattern = "spec/**/*_spec.rb" spec.rcov = true end -task :default => :spec - +## RDoc require "rdoc/task" Rake::RDocTask.new do |rdoc| version = File.exist?("VERSION") ? File.read("VERSION") : "" - rdoc.rdoc_dir = "rdoc" rdoc.title = "lapidary #{version}" rdoc.rdoc_files.include("README*") rdoc.rdoc_files.include("lib/**/*.rb") end -require "ci/reporter/rake/rspec" # use this if you're using RSpec +## YARD +require 'yard' +require 'yard/rake/yardoc_task' +YARD::Rake::YardocTask.new do |t| + t.files = ['app/controllers/**/*.rb','app/helpers/**/*.rb', 'app/mailers/**/*.rb', 'app/models/**/*.rb', 'lib/**/*.rb'] + t.options = [] + t.options << '--debug' << '--verbose' if $trace +end +# CI::Reporter +require "ci/reporter/rake/rspec" + +## RCov if RUBY_VERSION <= '1.8.7' require "rcov" RSpec::Core::RakeTask.new("spec:rcov") do |t| t.rcov = true t.rspec_opts = ["-c"] @@ -61,5 +71,6 @@ RSpec::Core::RakeTask.new("spec:rcov") do |t| t.rspec_opts = ["-v"] end end +task :default => :spec