Find file
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (72 sloc) 2.61 KB
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "qbfc"
gem.rubyforge_project = "qbfc"
gem.summary = "A wrapper around the QBFC COM object of the Quickbooks SDK"
gem.description = %q{QBFC-Ruby wraps the QBFC COM object of the QuickBooks
SDK, providing ease-of-use improvements, such as lower-case method names,
and find, save, delete, void, and create operations.}
gem.email = "jmorgan@morgancreative.net"
gem.homepage = "http://rubyforge.org/projects/qbfc/"
gem.authors = ["Jared Morgan"]
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rf = Jeweler::RubyforgeTasks.new
rf.remote_doc_path = ''
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
require 'spec/rake/spectask'
QBFC_ROOT = File.dirname(__FILE__)
desc "Run all specs in spec/unit directory"
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/unit/**/*_spec.rb'
spec.spec_opts = ['--options', "\"#{QBFC_ROOT}/spec/spec.opts\""]
end
namespace :spec do
desc "Run all specs in spec/unit directory with RCov"
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/unit/**/*_spec.rb'
spec.spec_opts = ['--options', "\"#{QBFC_ROOT}/spec/spec.opts\""]
spec.rcov = true
spec.rcov_opts = lambda do
IO.readlines("#{QBFC_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
end
end
desc "Run all specs in spec/integration directory"
Spec::Rake::SpecTask.new(:integration) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/integration/**/*_spec.rb'
spec.spec_opts = ['--options', "\"#{QBFC_ROOT}/spec/spec.opts\""]
end
desc "Run all specs in spec/integration directory with RCov"
Spec::Rake::SpecTask.new(:integration_rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/unit/**/*_spec.rb'
spec.spec_opts = ['--options', "\"#{QBFC_ROOT}/spec/spec.opts\""]
spec.rcov = true
spec.rcov_opts = lambda do
IO.readlines("#{QBFC_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
end
end
end
task :default => :spec
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "QBFC-Ruby #{version}"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end