Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename vendor/environment.rb to .bundle/environment.rb

  • Loading branch information...
commit d4e033e7ef0cf703a08895b6844e77adf3ba721f 1 parent b838b26
Carlhuda authored
View
2  README.markdown
@@ -85,7 +85,7 @@ To do this, include the following at the beginning of your code.
begin
# Require the preresolved locked set of gems.
- require File.expand_path('../vendor/environment', __FILE__)
+ require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
View
8 lib/bundler/environment.rb
@@ -25,7 +25,7 @@ def dependencies
def lock
Bundler.ui.info("The bundle is already locked, relocking.") if locked?
- FileUtils.mkdir_p("#{root}/vendor")
+ FileUtils.mkdir_p("#{root}/.bundle")
write_yml_lock
write_rb_lock
Bundler.ui.info("The bundle is now locked. Use `bundle show` to list the gems in the environment.")
@@ -37,8 +37,8 @@ def unlock
return
end
- File.delete("#{root}/vendor/environment.rb")
- File.delete("#{root}/Gemfile.lock")
+ FileUtils.rm_f("#{root}/.bundle/environment.rb")
+ FileUtils.rm_f("#{root}/Gemfile.lock")
Bundler.ui.info("The bundle is now unlocked. The dependencies may be changed.")
end
@@ -125,7 +125,7 @@ def gem(*)
def write_rb_lock
template = File.read(File.expand_path("../templates/environment.erb", __FILE__))
erb = ERB.new(template, nil, '-')
- File.open("#{root}/vendor/environment.rb", 'w') do |f|
+ File.open("#{root}/.bundle/environment.rb", 'w') do |f|
f.puts erb.result(binding)
end
end
View
4 spec/lock/gems_spec.rb
@@ -29,8 +29,8 @@
end
it "creates an environment.rb file in ./vendor" do
- bundled_app("vendor/environment.rb").should_not exist
+ bundled_app(".bundle/environment.rb").should_not exist
bundle :lock
- bundled_app("vendor/environment.rb").should exist
+ bundled_app(".bundle/environment.rb").should exist
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.