-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
84 lines (72 loc) · 2.61 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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 = "[email protected]"
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