Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.844 kb
BUNDLER_VERSION="1.0.15"
namespace :bundle do
desc "Install the gem bundle from the lockfile"
task :expand => :ensure_bundler_available do
system("bundle _#{BUNDLER_VERSION}_ install")
fail bordered_message("bundler failed") unless $? == 0
end
task :ensure_bundler_available do
`gem list -i bundler -v '#{BUNDLER_VERSION}'`
unless $? == 0
puts bordered_message("Installing bundler #{BUNDLER_VERSION}")
system("gem install bundler -v '#{BUNDLER_VERSION}'")
unless $? == 0
fail bordered_message("Install failed.\nPlease fix the problem and try again or manually install bundler #{BUNDLER_VERSION}.")
end
end
end
def bordered_message(msg)
len = msg.split("\n").collect { |l| l.size }.max
['=' * len, msg, '=' * len].join("\n")
end
end
task :default => :'bundle:expand'
Jump to Line
Something went wrong with that request. Please try again.