Added support for Gemfile.local

bug/bundler_fix
kn0 2014-02-21 13:37:31 -06:00
parent 998fa06912
commit fcfb48fda1
2 changed files with 9 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
.bundle .bundle
Gemfile.local
Gemfile.local.lock
# Rubymine project directory # Rubymine project directory
.idea .idea
# Sublime Text project directory (not created by ST by default) # Sublime Text project directory (not created by ST by default)

View File

@ -2,7 +2,13 @@
# Use bundler to load dependencies # Use bundler to load dependencies
# #
ENV['BUNDLE_GEMFILE'] ||= ::File.expand_path(::File.join(::File.dirname(__FILE__), "..", "Gemfile")) gemfile_base = ::File.expand_path(::File.join(::File.dirname(__FILE__), ".."))
if File.readable?(::File.join(gemfile_base,"Gemfile.local"))
ENV['BUNDLE_GEMFILE'] ||= ::File.join(gemfile_base, "Gemfile.local")
else
ENV['BUNDLE_GEMFILE'] ||= ::File.join(gemfile_base, "Gemfile")
end
begin begin
require 'bundler/setup' require 'bundler/setup'
rescue ::LoadError rescue ::LoadError