diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-03 13:29:33 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-03 13:29:33 -0800 |
commit | d4e033e7ef0cf703a08895b6844e77adf3ba721f (patch) | |
tree | 232874b9004976b73572726783e4fad34de545d4 | |
parent | b838b26a9fc27b5490da55ccd279cfac808b7972 (diff) | |
download | bundler-d4e033e7ef0cf703a08895b6844e77adf3ba721f.tar.gz |
Rename vendor/environment.rb to .bundle/environment.rb
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | lib/bundler/environment.rb | 8 | ||||
-rw-r--r-- | spec/lock/gems_spec.rb | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/README.markdown b/README.markdown index f2a5e42bc6..7332101a37 100644 --- a/README.markdown +++ b/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" diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb index 803e7ddce9..a6037909a8 100644 --- a/lib/bundler/environment.rb +++ b/lib/bundler/environment.rb @@ -25,7 +25,7 @@ module Bundler 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 @@ module Bundler 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 @@ module Bundler 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 diff --git a/spec/lock/gems_spec.rb b/spec/lock/gems_spec.rb index 947e6a35d6..dae9699338 100644 --- a/spec/lock/gems_spec.rb +++ b/spec/lock/gems_spec.rb @@ -29,8 +29,8 @@ describe "gemfile lock with gems" do 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
\ No newline at end of file |