Rakefile in prawn-0.11.1.pre vs Rakefile in prawn-0.11.1
- old
+ new
@@ -1,6 +1,9 @@
-require 'rubygems'
+require "rubygems"
+require "bundler"
+Bundler.setup
+
require 'rake'
require 'rake/testtask'
require "rake/rdoctask"
require "rake/gempackagetask"
@@ -31,18 +34,26 @@
rdoc.main = "README"
rdoc.rdoc_dir = "doc/html"
rdoc.title = "Prawn Documentation"
end
-desc "run all examples, and then diff them against reference PDFs"
-task :examples do
+desc "run all examples"
+task :examples do
mkdir_p "output"
examples = Dir["examples/**/*.rb"]
t = Time.now
puts "Running Examples"
- examples.each { |file| `ruby -Ilib #{file}` }
- puts "Ran in #{Time.now - t} s"
- `mv *.pdf output`
+ examples.each { |file| `ruby -Ilib #{file}` }
+ puts "Ran in #{Time.now - t} s"
+ `mv *.pdf output`
+end
+
+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]))
+ puts "The Prawn manual is available at manual.pdf. Happy Prawning!"
end
spec = Gem::Specification.load "prawn.gemspec"
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true