forked from jordanbrock/campaign-monitor-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
29 lines (24 loc) · 754 Bytes
/
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
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'rake/rdoctask'
# read the contents of the gemspec, eval it, and assign it to 'spec'
# this lets us maintain all gemspec info in one place. Nice and DRY.
spec = eval(IO.read("campaign_monitor.gemspec"))
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
task :install => [:package] do
sh %{sudo gem install pkg/#{spec.name}-#{spec.version}}
end
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
rd.rdoc_dir = 'doc'
rd.options = spec.rdoc_options
end