Sha256: 8bb573675fbe8afc2e99e3cd283b3d24a360341d33593f1f4b1852ba66fd2104
Contents?: true
Size: 767 Bytes
Versions: 1
Compression:
Stored size: 767 Bytes
Contents
require 'appraisal' include Rake::DSL 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' ]}" end desc "Remove all test rails apps" task :clean => [ :env ] do Dir[ 'spec/rails/rails-*' ].each do |app| FileUtils.rm_rf app end end desc "Create a test rails app if necessary" task :rails => [ :env ] do if File.exist? ENV[ 'BALDWIN_RAILS_PATH' ] puts "Using existing #{ENV[ 'BALDWIN_RAILS_NAME' ]} app" else sh "bundle exec rails new #{ENV[ 'BALDWIN_RAILS_PATH' ]} -m spec/support/rails_template.rb" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
baldwin-0.0.1 | lib/baldwin/tasks.rb |