lib/baldwin/gem_tasks.rb in baldwin-0.2.1 vs lib/baldwin/gem_tasks.rb in baldwin-0.2.2

- old
+ new

@@ -6,19 +6,15 @@ namespace :baldwin do desc "Set up current environment variables" task :env do - require 'rails/version' - ENV[ 'BALDWIN_RAILS_NAME' ] = "rails-#{Rails::VERSION::STRING}" - ENV[ 'BALDWIN_RAILS_PATH' ] = "spec/rails/#{ENV[ 'BALDWIN_RAILS_NAME' ]}" + Baldwin.env! end desc "Remove all test rails apps" task :clean => [ :env ] do - Dir[ 'spec/rails/rails-*' ].each do |app| - FileUtils.rm_rf app - end + Baldwin.apps.each { |app| app.rmdir :force => true } end desc "Create a test rails app if necessary" task :rails => [ :env ] do if File.exist? ENV[ 'BALDWIN_RAILS_PATH' ]