Rakefile in prawn-0.1.0 vs Rakefile in prawn-0.1.1
- old
+ new
@@ -2,11 +2,11 @@
require 'rake'
require 'spec/rake/spectask'
require "rake/rdoctask"
require "rake/gempackagetask"
-PRAWN_VERSION = "0.1.0"
+PRAWN_VERSION = "0.1.1"
task :default => [:spec]
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
@@ -31,24 +31,25 @@
end
desc "run all examples, and then diff them against reference PDFs"
task :examples do
mkdir_p "output"
- examples = Dir["examples/*.rb"].reject { |e| e =~ /bench|sjis/ }
+ examples = Dir["examples/*.rb"].reject { |e| e =~ /bench/ }
t = Time.now
- puts "Running Examples"
+ puts "Running Examples, skipping benchmark"
examples.each { |file| `ruby -Ilib #{file}` }
puts "Ran in #{Time.now - t} s"
`mv *.pdf output`
-=begin
- # Has some issues
- puts "Checking for differences..."
- output = Dir["output/*.pdf"]
- ref = Dir["reference_pdfs/*.pdf"]
- output.zip(ref).each do |o,r|
- system "diff -q #{o} #{r}"
- end
-=end
+
+ unless RUBY_VERSION < "1.9"
+ puts "Checking for differences..."
+ output = Dir["output/*.pdf"]
+ ref = Dir["reference_pdfs/*.pdf"]
+ output.zip(ref).each do |o,r|
+ system "diff -q #{o} #{r}"
+ end
+ end
+
end
spec = Gem::Specification.new do |spec|
spec.name = "prawn"
spec.version = PRAWN_VERSION