1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't push siblings on load path if using bundled env

This commit is contained in:
Jeremy Kemper 2009-10-14 20:59:45 -07:00
parent 5b8e6279ac
commit 4484f0bccf
2 changed files with 16 additions and 7 deletions

View file

@ -1,9 +1,15 @@
bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment"
if File.exist?("#{bundled}.rb")
require bundled
else
$:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
$:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib"
end
require 'rubygems'
require 'test/unit'
$:.unshift "#{File.dirname(__FILE__)}/../lib"
$:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
$:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib"
require 'action_mailer'
require 'action_mailer/test_case'

View file

@ -1,14 +1,17 @@
bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment"
if File.exist?("#{bundled}.rb")
require bundled
else
$:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
$:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib"
end
$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
$:.unshift(File.dirname(__FILE__) + '/../../activemodel/lib')
$:.unshift(File.dirname(__FILE__) + '/lib')
$:.unshift(File.dirname(__FILE__) + '/fixtures/helpers')
$:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers')
bundler = File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', 'environment')
require bundler if File.exist?("#{bundler}.rb")
begin
%w( rack rack/test sqlite3 ).each { |lib| require lib }
rescue LoadError => e