Permalink
Browse files

Add rake bootstrap task.

  • Loading branch information...
1 parent 4287f61 commit 343dae2de593f699974667722b4db9911335f485 @alloy alloy committed Dec 7, 2013
Showing with 32 additions and 1 deletion.
  1. +1 −1 README.md
  2. +31 −0 Rakefile
View
2 README.md
@@ -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
```
View
31 Rakefile
@@ -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

0 comments on commit 343dae2

Please sign in to comment.