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

Commit

Permalink
Merge branch '1-1-stable'
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
	lib/bundler/version.rb

1.1.3 release merge
  • Loading branch information
hone committed Mar 24, 2012
2 parents 55ecac9 + b2af3d2 commit bc2e590
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Features:
For instance, if you have a git dependency on rack, you can force
it to use a local repo with `bundle config local.rack ~/path/to/rack`

## 1.1.3 (March 23, 2012)

Bugfixes:

- escape the bundler root path (@tenderlove, #1789)

## 1.1.2 (March 20, 2012)

Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def load_spec_files
end

def relative_path
if path.to_s.match(%r{^#{Bundler.root.to_s}})
if path.to_s.match(%r{^#{Regexp.escape Bundler.root.to_s}})
return path.relative_path_from(Bundler.root)
end
path
Expand Down
23 changes: 23 additions & 0 deletions spec/install/gems/simple_case_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,29 @@
end
end

describe "when Bundler root contains regex chars" do
before do
root_dir = tmp("foo[]bar")

FileUtils.mkdir_p(root_dir)
in_app_root_custom(root_dir)
end

it "doesn't blow up" do
build_lib "foo"
gemfile = <<-G
gem 'foo', :path => "#{lib_path('foo-1.0')}"
G
File.open('Gemfile', 'w') do |file|
file.puts gemfile
end

bundle :install, :exitstatus => true

exitstatus.should == 0
end
end

describe "when prerelease gems are available" do
it "finds prereleases" do
install_gemfile <<-G
Expand Down
4 changes: 4 additions & 0 deletions spec/support/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def in_app_root2(&blk)
Dir.chdir(bundled_app2, &blk)
end

def in_app_root_custom(root, &blk)
Dir.chdir(root, &blk)
end

def run(cmd, *args)
opts = args.last.is_a?(Hash) ? args.pop : {}
expect_err = opts.delete(:expect_err)
Expand Down

0 comments on commit bc2e590

Please sign in to comment.