yob / pdf-reader
- Source
- Commits
- Network (6)
- Issues (1)
- Downloads (14)
- Wiki (1)
- Graphs
-
Tree:
0796536
commit 079653654d72519d796ba9c1de16d0f87682e0ed
tree db4383c776bb91e200a68353a0e332ce8bdda8b5
parent 090638048a38896b2b501421837ebbb3be9d9b03
tree db4383c776bb91e200a68353a0e332ce8bdda8b5
parent 090638048a38896b2b501421837ebbb3be9d9b03
pdf-reader / Rakefile
| 04b8120f » | jhealy | 2007-09-01 | 1 | require "rubygems" | |
| 2 | require 'rake' | ||||
| 3 | require 'rake/clean' | ||||
| 4 | require 'rake/rdoctask' | ||||
| 5 | require 'rake/testtask' | ||||
| 6 | require "rake/gempackagetask" | ||||
| 7 | require 'spec/rake/spectask' | ||||
| 8 | |||||
| 0ae55e7d » | yob | 2008-08-26 | 9 | PKG_VERSION = "0.7.5" | |
| 04b8120f » | jhealy | 2007-09-01 | 10 | PKG_NAME = "pdf-reader" | |
| 11 | PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" | ||||
| 12 | |||||
| 13 | desc "Default Task" | ||||
| 14 | task :default => [ :spec ] | ||||
| 15 | |||||
| 16 | # run all rspecs | ||||
| 17 | desc "Run all rspec files" | ||||
| 18 | Spec::Rake::SpecTask.new("spec") do |t| | ||||
| 19 | t.spec_files = FileList['specs/**/*.rb'] | ||||
| 20 | t.rcov = true | ||||
| 21 | t.rcov_dir = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + "/rcov" | ||||
| 22 | # t.rcov_opts = ["--exclude","spec.*\.rb"] | ||||
| 23 | end | ||||
| 24 | |||||
| 25 | # generate specdocs | ||||
| 26 | desc "Generate Specdocs" | ||||
| 27 | Spec::Rake::SpecTask.new("specdocs") do |t| | ||||
| 28 | t.spec_files = FileList['specs/**/*.rb'] | ||||
| 29 | t.spec_opts = ["--format", "rdoc"] | ||||
| 30 | t.out = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + '/specdoc.rd' | ||||
| 31 | end | ||||
| 32 | |||||
| 33 | # generate failing spec report | ||||
| 34 | desc "Generate failing spec report" | ||||
| 35 | Spec::Rake::SpecTask.new("spec_report") do |t| | ||||
| 36 | t.spec_files = FileList['specs/**/*.rb'] | ||||
| 37 | t.spec_opts = ["--format", "html", "--diff"] | ||||
| 38 | t.out = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + '/spec_report.html' | ||||
| 39 | t.fail_on_error = false | ||||
| 40 | end | ||||
| 41 | |||||
| 42 | # Genereate the RDoc documentation | ||||
| 43 | desc "Create documentation" | ||||
| 44 | Rake::RDocTask.new("doc") do |rdoc| | ||||
| 45 | rdoc.title = "pdf-reader" | ||||
| 46 | rdoc.rdoc_dir = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + '/rdoc' | ||||
| ab8d110b » | yob | 2008-06-03 | 47 | rdoc.rdoc_files.include('README.rdoc') | |
| 36a836c5 » | jhealy | 2007-12-13 | 48 | rdoc.rdoc_files.include('TODO') | |
| 49 | rdoc.rdoc_files.include('CHANGELOG') | ||||
| 04b8120f » | jhealy | 2007-09-01 | 50 | #rdoc.rdoc_files.include('COPYING') | |
| 51 | #rdoc.rdoc_files.include('LICENSE') | ||||
| 52 | rdoc.rdoc_files.include('lib/**/*.rb') | ||||
| 53 | rdoc.options << "--inline-source" | ||||
| 54 | end | ||||
| 55 | |||||
| 56 | # a gemspec for packaging this library | ||||
| 57 | # RSpec files aren't included, as they depend on the PDF files, | ||||
| 58 | # which will make the gem filesize irritatingly large | ||||
| 59 | spec = Gem::Specification.new do |spec| | ||||
| 60 | spec.name = PKG_NAME | ||||
| 61 | spec.version = PKG_VERSION | ||||
| 62 | spec.platform = Gem::Platform::RUBY | ||||
| 63 | spec.summary = "A library for accessing the content of PDF files" | ||||
| 64 | spec.files = Dir.glob("{examples,lib}/**/**/*") + | ||||
| 65 | ["Rakefile"] | ||||
| 66 | |||||
| 67 | spec.require_path = "lib" | ||||
| 5f55a234 » | jhealy | 2008-05-11 | 68 | spec.bindir = "bin" | |
| 2aef778e » | jhealy | 2008-05-27 | 69 | spec.executables << "pdf_object" | |
| 5f55a234 » | jhealy | 2008-05-11 | 70 | spec.executables << "pdf_text" | |
| 71 | spec.executables << "pdf_list_callbacks" | ||||
| 04b8120f » | jhealy | 2007-09-01 | 72 | spec.has_rdoc = true | |
| 5fd71d26 » | yob | 2008-06-10 | 73 | spec.extra_rdoc_files = %w{README.rdoc TODO CHANGELOG} | |
| 04b8120f » | jhealy | 2007-09-01 | 74 | spec.rdoc_options << '--title' << 'PDF::Reader Documentation' << | |
| 5fd71d26 » | yob | 2008-06-10 | 75 | '--main' << 'README.rdoc' << '-q' | |
| 04b8120f » | jhealy | 2007-09-01 | 76 | spec.author = "Peter Jones" | |
| 77 | spec.email = "pjones@pmade.com" | ||||
| 78 | spec.rubyforge_project = "pdf-reader" | ||||
| 79 | spec.homepage = "http://software.pmade.com/pdfreader" | ||||
| 80 | spec.description = "The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe" | ||||
| 81 | end | ||||
| 82 | |||||
| 83 | # package the library into a gem | ||||
| 84 | desc "Generate a gem for pdf-reader" | ||||
| 85 | Rake::GemPackageTask.new(spec) do |pkg| | ||||
| 86 | pkg.need_zip = true | ||||
| 87 | pkg.need_tar = true | ||||
| 88 | end | ||||
