Sha256: 090bf7e3173d4db7271b0b5f4b45c7dfb8397923ed8fa62e872542e01482c032

Contents?: true

Size: 875 Bytes

Versions: 3

Compression:

Stored size: 875 Bytes

Contents

require 'appraisal'
require 'baldwin'

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/rails/rails_template.rb"
    end
  end

  desc "Install testing awesomeness"
  task :install do
    Baldwin::Installer.start
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
baldwin-0.2.0 lib/baldwin/gem_tasks.rb
baldwin-0.1.1 lib/baldwin/tasks.rb
baldwin-0.1.0 lib/baldwin/tasks.rb