Created
March 4, 2010 12:48
-
-
Save gotascii/321668 to your computer and use it in GitHub Desktop.
This file contains 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
.bundle/environment.rb | |
bundler_gems |
This file contains 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
class Rails::Boot | |
def run | |
load_initializer | |
extend_environment | |
Rails::Initializer.run(:set_load_path) | |
end | |
def extend_environment | |
Rails::Initializer.class_eval do | |
old_load = instance_method(:load_environment) | |
define_method(:load_environment) do | |
Bundler.require :default, Rails.env | |
old_load.bind(self).call | |
end | |
end | |
end | |
end |
This file contains 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
namespace :bundler do | |
task :bundle_new_release do | |
run("cd #{release_path} && bundle install") | |
end | |
end | |
after 'deploy:update_code', 'bundler:bundle_new_release' |
This file contains 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
source "http://rubygems.org" | |
gem "rails", "2.3.5", :require => nil | |
gem "mysql", "2.8.1" | |
group :test do | |
gem "shoulda", "2.10.3" | |
gem "factory_girl", "1.2.3" | |
gem "fcoury-matchy", "0.4.0", :require => "matchy" | |
gem "rcov", "0.9.7.1" | |
gem "mocha", "0.9.8" | |
gem "metric_fu", "1.3.0" | |
end |
This file contains 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
begin | |
# Require the preresolved locked set of gems. | |
require File.expand_path('../../.bundle/environment', __FILE__) | |
rescue LoadError | |
# Fallback on doing the resolve at runtime. | |
require "rubygems" | |
require "bundler" | |
Bundler.setup | |
end |
This file contains 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
Bundler.require(:test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment