Rakefile in prawn-1.0.0.rc2 vs Rakefile in prawn-1.0.0
- old
+ new
@@ -1,37 +1,34 @@
require "bundler"
Bundler.setup
require 'rake'
require 'rspec/core/rake_task'
-require 'rdoc/task'
+require 'yard'
require 'rubygems/package_task'
task :default => [:spec]
-
+
desc "Run all rspec files"
-RSpec::Core::RakeTask.new("spec")
+RSpec::Core::RakeTask.new("spec") do |c|
+ c.rspec_opts = "-t ~unresolved"
+end
desc "Show library's code statistics"
task :stats do
- require 'code_statistics'
- CodeStatistics::TEST_TYPES << "Specs"
- CodeStatistics.new( ["Prawn", "lib"],
- ["Specs", "spec"] ).to_s
+ require 'code_statistics'
+ CodeStatistics::TEST_TYPES << "Specs"
+ CodeStatistics.new( ["Prawn", "lib"],
+ ["Specs", "spec"] ).to_s
end
-desc "genrates documentation"
-RDoc::Task.new do |rdoc|
- rdoc.rdoc_files.include( "README",
- "COPYING",
- "LICENSE",
- "HACKING", "lib/" )
- rdoc.main = "README"
- rdoc.rdoc_dir = "doc/html"
- rdoc.title = "Prawn Documentation"
+YARD::Rake::YardocTask.new do |t|
+ t.options = ['--output-dir', 'doc/html']
end
+task :docs => :yard
+
desc "Generate the 'Prawn by Example' manual"
task :manual do
puts "Building manual..."
require File.expand_path(File.join(File.dirname(__FILE__),
%w[manual manual manual]))
@@ -41,5 +38,17 @@
spec = Gem::Specification.load "prawn.gemspec"
Gem::PackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
+
+desc "Run a console with Prawn loaded"
+task :console do
+ require 'irb'
+ require 'irb/completion'
+ require_relative 'lib/prawn'
+ Prawn.debug = true
+
+ ARGV.clear
+ IRB.start
+end
+