Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Use local.rack as override config instead of rack.local.
Browse files Browse the repository at this point in the history
  • Loading branch information
José Valim committed Mar 19, 2012
1 parent 01b377d commit e728e8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/settings.rb
Expand Up @@ -37,8 +37,8 @@ def all
def local_overrides
repos = {}
all.each do |k|
if k =~ /\.local$/
repos[$`] = self[k]
if k =~ /^local\./
repos[$'] = self[k]
end
end
repos
Expand Down
16 changes: 8 additions & 8 deletions spec/install/git_spec.rb
Expand Up @@ -170,7 +170,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install
out.should =~ /at #{lib_path('local-rack')}/

Expand All @@ -192,7 +192,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
run "require 'rack'"
out.should == "LOCAL"
end
Expand All @@ -214,7 +214,7 @@
s.add_dependency "nokogiri", "1.4.2"
end

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
run "require 'rack'"

lockfile1 = File.read(bundled_app("Gemfile.lock"))
Expand All @@ -234,7 +234,7 @@
FileUtils.cp_r("#{lib_path('rack-0.8')}/.", lib_path('local-rack'))
update_git "rack", "0.8", :path => lib_path('local-rack')

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install

lockfile1 = File.read(bundled_app("Gemfile.lock"))
Expand All @@ -249,7 +249,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install
out.should =~ /Cannot use local override for rack-0.8 because #{Regexp.escape(lib_path('local-rack').to_s)} does not exist/
end
Expand All @@ -263,7 +263,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install
out.should =~ /because :branch is not specified in Gemfile/
end
Expand All @@ -282,7 +282,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install
out.should =~ /is using branch another but Gemfile specifies master/
end
Expand All @@ -299,7 +299,7 @@
gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
G

bundle %|config rack.local #{lib_path('local-rack')}|
bundle %|config local.rack #{lib_path('local-rack')}|
bundle :install
out.should =~ /The Gemfile lock is pointing to revision \w+/
end
Expand Down

0 comments on commit e728e8e

Please sign in to comment.