Permalink
Browse files

Fix full_build to install bundler.

  • Loading branch information...
1 parent 333cc30 commit 69715e37f3c3573ab06b00f192db92e1dc3bcb50 @myronmarston committed Nov 8, 2010
Showing with 14 additions and 1 deletion.
  1. +14 −1 FullBuildRakeFile
View
15 FullBuildRakeFile
@@ -2,8 +2,21 @@
# already being installed. This must be able to run w/o bundled gems installed.
desc "Run a full build: install necessary gems with bundler, runs specs, run cukes"
-task :build do
+task :build => :ensure_bundler_installed do
sh "bundle install"
sh "rake"
end
+task :ensure_bundler_installed do
+ installed = begin
+ require 'rubygems'
+ require 'bundler'
+ true
+ rescue LoadError
+ false
+ end
+
+ unless installed
+ sh "gem install bundler"
+ end
+end

0 comments on commit 69715e3

Please sign in to comment.