require 'rake' require 'rake/testtask' include Config desc "Install the crypt-fog package (non-gem) and the fogenc program" task :install do dest = File.join(CONFIG['sitelibdir'], 'crypt') Dir.mkdir(dest) unless File.exists? dest cp 'lib/crypt/fog.rb', dest, :verbose => true cp 'bin/fogenc', CONFIG['bindir'], :verbose => true end desc "Install the crypt-fog library (non-gem) only" task :install_lib do dest = File.join(CONFIG['sitelibdir'], 'crypt') Dir.mkdir(dest) unless File.exists? dest cp 'lib/crypt/fog.rb', dest, :verbose => true end desc "Install the crypt-fog package as a gem" task :install_gem do ruby 'crypt-fog.gemspec' file = Dir["*.gem"].first sh "gem install #{file}" end Rake::TestTask.new do |t| t.libs << 'lib' t.warning = true t.test_files = FileList['test/tc*'] end