-
-
Save bogdanRada/e3787ccd82d1e9089cb3d1de49789758 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
# Take a copy of the arguments as rubygems or bundler modifies them | |
args = ARGV.dup | |
begin | |
gem "bundler" | |
rescue Gem::LoadError | |
require "rubygems/dependency_installer" | |
installer = Gem::DependencyInstaller.new :document => [] | |
installer.install "bundler" | |
end | |
require "bundler" | |
require "bundler/cli" | |
Bundler::CLI.new.invoke :install, [], :path => "managed_libs", :quiet => true | |
require "bundler/setup" | |
require "bozo" | |
# Assign the command line arguments back so Bozo can inspect them | |
ARGV.clear.push *args | |
Bozo.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is exactly what i needed. I was searching for a way to invoke the install method on Bundler::CLI for days...and this saved my day :) Thank you very much.