From 3b53bdc79e6a9451ea6269ea71bda0ebbf96701e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 5 Feb 2010 23:41:22 -0800 Subject: [PATCH] Updated to bundler 0.9.3 gemfile format --- Gemfile | 17 +++++------------ bin/hobo | 9 +++++++-- bin/hobo-down | 6 +++++- bin/hobo-resume | 6 +++++- bin/hobo-ssh | 6 +++++- bin/hobo-suspend | 6 +++++- bin/hobo-up | 6 +++++- test/test_helper.rb | 18 ++++++------------ 8 files changed, 43 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index 69691f6f9..f4b28f2d6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,22 +1,15 @@ +source :gemcutter +source "http://gems.github.com" + # Gems required for the lib to even run gem "virtualbox", ">= 0.4.3" gem "net-ssh", ">= 2.0.19" - -source "http://gems.github.com" gem "jashmenn-git-style-binaries", ">= 0.1.10" # Gems required for testing only. To install run # gem bundle test -only :test do +group :test do gem "contest", ">= 0.1.2" gem "mocha" gem "ruby-debug", ">= 0.10.3" if RUBY_VERSION < '1.9' -end - -# Since hobo uses bin/, change the bin_path to something -# else... -bin_path "gembin" - -# Makes sure that our code doesn't request gems outside -# of our dependency list. -disable_system_gems \ No newline at end of file +end \ No newline at end of file diff --git a/bin/hobo b/bin/hobo index 7799f7502..ebc5b6c54 100755 --- a/bin/hobo +++ b/bin/hobo @@ -1,12 +1,17 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end + require 'git-style-binary/command' GitStyleBinary.primary do version "Somewhere between 0 and 0.1" - + run { educate } end \ No newline at end of file diff --git a/bin/hobo-down b/bin/hobo-down index 7f1cfc931..7463d59e4 100755 --- a/bin/hobo-down +++ b/bin/hobo-down @@ -1,7 +1,11 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end require 'git-style-binary/command' diff --git a/bin/hobo-resume b/bin/hobo-resume index 15c8369a2..441f2177c 100755 --- a/bin/hobo-resume +++ b/bin/hobo-resume @@ -1,7 +1,11 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end require 'git-style-binary/command' diff --git a/bin/hobo-ssh b/bin/hobo-ssh index 831242cee..7371e4b45 100755 --- a/bin/hobo-ssh +++ b/bin/hobo-ssh @@ -1,7 +1,11 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end require 'git-style-binary/command' diff --git a/bin/hobo-suspend b/bin/hobo-suspend index ff5594809..e9993d588 100755 --- a/bin/hobo-suspend +++ b/bin/hobo-suspend @@ -1,7 +1,11 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end require 'git-style-binary/command' diff --git a/bin/hobo-up b/bin/hobo-up index 9316d7959..a16a5d622 100755 --- a/bin/hobo-up +++ b/bin/hobo-up @@ -1,7 +1,11 @@ #!/usr/bin/env ruby begin - require File.expand_path(File.join(File.dirname(__FILE__), "../vendor/gems/ruby/1.8/environment")) + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end require 'git-style-binary/command' diff --git a/test/test_helper.rb b/test/test_helper.rb index 2f234d202..1874d8da1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,16 +1,10 @@ - begin - require File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', 'environment') +begin + require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError - puts <<-ENVERR -================================================== -ERROR: Gem environment file not found! - -Hobo uses bundler to handle gem dependencies. To setup the -test environment, please run `gem bundle test` If you don't -have bundler, you can install that with `gem install bundler` -================================================== -ENVERR - exit + # Fallback on doing the resolve at runtime. + require "rubygems" + require "bundler" + Bundler.setup end # This silences logger output