Skip to content

Commit

Permalink
Add rake bootstrap task.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Dec 7, 2013
1 parent 4287f61 commit 343dae2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -19,7 +19,7 @@ During each update it tweets the new pods.
```shell
$ cp .env.sample .env
$ vim .env
$ bundle install
$ rake bootstrap
$ foreman start
```

Expand Down
31 changes: 31 additions & 0 deletions Rakefile
Expand Up @@ -3,6 +3,37 @@ task :default => :spec

#--------------------------------------#

def execute_command(command)
if ENV['VERBOSE']
sh(command)
else
output = `#{command} 2>&1`
raise output unless $?.success?
end
end

def title(title)
cyan_title = "\033[0;36m#{title}\033[0m"
puts
puts "-" * 80
puts cyan_title
puts "-" * 80
puts
end

desc "Initializes your working copy to run the specs"
task :bootstrap do
title "Environment bootstrap"

puts "Updating submodules"
execute_command "git submodule update --init --recursive"

puts "Installing gems"
execute_command "bundle install"
end

#--------------------------------------#

namespace :spec do
desc "Run all the specs"
task :all do
Expand Down

0 comments on commit 343dae2

Please sign in to comment.