Sha256: e6bf07ecedf8193ff143794ad6756fe1ebf938f7dde9011ffc55e50743211d6e

Contents?: true

Size: 1.23 KB

Versions: 18

Compression:

Stored size: 1.23 KB

Contents

task :restart do
  system "touch tmp/restart.txt"
  system "touch tmp/debug.txt" if ENV["DEBUG"] == 'true'
end

desc "Bootstrap project"
task :bootstrap => %w(bootstrap:files gems:install db:create db:migrate restart)

namespace :bootstrap do
  desc "Bootstrap project to run tests"
  task :test => :bootstrap do
    system "rake gems:install db:create db:schema:load RAILS_ENV=test"
    system "rake gems:install RAILS_ENV=cucumber"
  end

  desc "Bootstrap project to run in production"
  task :production => :bootstrap do
    if File.exist?("public/stylesheets/sass") or File.exist?("app/sass")
      Sass::Plugin.options[:always_update] = true;
      Sass::Plugin.update_stylesheets
    end
    Rake::Task["asset:packager:build_all"].invoke if File.exist?("vendor/plugins/asset_packager")
  end

  task :files do
    system "git submodule sync"
    system "git submodule init"
    system "git submodule update --merge"
    system "git submodule foreach 'git checkout `git name-rev --name-only HEAD`'"
    system "cp config/database.sample.yml config/database.yml" unless File.exist?('config/database.yml')
  end
end

Rake::Task[:default].clear
desc "Bootstrap the current project and run the tests."
task :default => ["bootstrap:test", :spec, :cucumber]

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
bard-rake-0.1.0 lib/bard/rake/bootstrap.rb
bard-0.8.26 lib/bard/rake.rb
bard-0.8.25 lib/bard/rake.rb
bard-0.8.24 lib/bard/rake.rb
bard-0.8.23 lib/bard/rake.rb
bard-0.8.22 lib/bard/rake.rb
bard-0.8.21 lib/bard/rake.rb
bard-0.8.20 lib/bard/rake.rb
bard-0.8.19 lib/bard/rake.rb
bard-0.8.18 lib/bard/rake.rb
bard-0.8.17 lib/bard/rake.rb
bard-0.8.16 lib/bard/rake.rb
bard-0.8.15 lib/bard/rake.rb
bard-0.8.14 lib/bard/rake.rb
bard-0.8.13 lib/bard/rake.rb
bard-0.8.12 lib/bard/rake.rb
bard-0.8.11 lib/bard/rake.rb
bard-0.8.10 lib/bard/rake.rb