public
Description: A Ruby Gem that gives you full access to several of the Amazon Web Services API from your Ruby/Ruby on Rails apps
Homepage: http://github.com/grempe/amazon-ec2
Clone URL: git://github.com/grempe/amazon-ec2.git
Click here to lend your support to: amazon-ec2 and make a donation at www.pledgie.com !
amazon-ec2 / Rakefile
100644 37 lines (30 sloc) 0.95 kb
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
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("amazon-ec2.gemspec"))
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end
 
desc "Package and then install the gem locally"
task :install => [:package] do
  sh %{sudo gem install pkg/#{GEM}-#{VER}}
end
 
desc "Package and then install the gem locally omitting documentation"
task :install_nodoc => [:package] do
  sh %{sudo gem install --no-ri --no-rdoc pkg/#{GEM}-#{VER}}
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
 
task :default => :test