public
Description: Run a self-healing, auto-scaled and monitored cloud simply, in the clouds, on nearly any hardware, such as EC2, eucalyptus and vmware
Homepage: http://www.poolpartyrb.com
Clone URL: git://github.com/auser/poolparty.git
Click here to lend your support to: poolparty and make a donation at www.pledgie.com !
auser (author)
Mon Jun 29 13:27:49 -0700 2009
commit  d623631381a0fd551d32405d13c81343a44f12de
tree    dfcfd3691826470efcdbf2d7c010ff7b24dff007
parent  a2c4238d40d731aee6411f0d0975eeca94bd81a4
poolparty / Rakefile
100644 60 lines (48 sloc) 1.778 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
require 'config/requirements'
 
begin
  require 'hanna/rdoctask'
rescue Exception => e
  require "rake/rdoctask"
end
 
require 'config/jeweler' # setup gem configuration
 
Dir['tasks/**/*.rake'].each { |rake| load rake }
 
desc "Clean tmp directory"
task :clean_tmp do |t|
  FileUtils.rm_rf("#{File.dirname(__FILE__)}/Manifest.txt") if ::File.exists?("#{File.dirname(__FILE__)}/Manifest.txt")
  FileUtils.touch("#{File.dirname(__FILE__)}/Manifest.txt")
  %w(logs tmp).each do |dir|
    FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
  end
end
 
desc "Remove the pkg directory"
task :clean_pkg do |t|
  %w(pkg).each do |dir|
    FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
  end
end
 
desc "Packge with timestamp"
task :update_timestamp do
  data = open("PostInstall.txt").read
  str = "Updated at #{Time.now.strftime("%H:%M %D")}"
  
  if data.scan(/Updated at/).empty?
    data = data ^ {:updated_at => str}
  else
    data = data.gsub(/just installed PoolParty\!(.*)$/, "just installed PoolParty! (#{str})")
  end
  ::File.open("PostInstall.txt", "w+") {|f| f << data }
end
 
namespace :gem do
  task(:build).prerequisites.unshift :gemspec # Prepend the gemspec generation
  
  desc "Build the gem only if the specs pass"
  task :test_then_build => [:spec, :build]
  
  desc "Build and install the gem only if the specs pass"
  task :test_then_install => [:spec, :install]
end
 
task :release => [:update_timestamp]
 
# Generate documentation
Rake::RDocTask.new do |rd|
  rd.main = "Readme.txt"
  rd.rdoc_files.include("Readme.txt", "lib/**/*.rb")
  rd.rdoc_dir = "rdoc"
  # rd.template = "hanaa"
end