Permalink
Browse files

Merge branch '1-1-stable'

Conflicts:
	CHANGELOG.md
	lib/bundler/version.rb

1.1.3 release merge
  • Loading branch information...
2 parents 55ecac9 + b2af3d2 commit bc2e590b1f5acb341949641d7b853d8c02c9b650 @hone hone committed Mar 24, 2012
Showing with 34 additions and 1 deletion.
  1. +6 −0 CHANGELOG.md
  2. +1 −1 lib/bundler/source.rb
  3. +23 −0 spec/install/gems/simple_case_spec.rb
  4. +4 −0 spec/support/helpers.rb
View
@@ -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:
View
@@ -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
@@ -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
View
@@ -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)

0 comments on commit bc2e590

Please sign in to comment.