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

Fix and spec for bug handling relative paths in Gemfile. #1162

Merged
merged 2 commits into from May 11, 2011
Merged

Fix and spec for bug handling relative paths in Gemfile. #1162

merged 2 commits into from May 11, 2011

Conversation

mbirk
Copy link
Contributor

@mbirk mbirk commented May 11, 2011

If a Gemspec contains a gem requirement with a version and :path option with a relative path, then the path will be resolved relative to the current working directory, rather than the Gemfile. For example:

gem 'rails', '2.2.3', :path => 'vendor/rails'

According to the Gemfile(5) spec (http://gembundler.com/man/gemfile.5.html):

"PATH (:path) ... Relative paths are resolved relative to the directory containing the Gemfile."

This pull request provides a fix for this bug, as well as a spec that demonstrates the issue.

@indirect
Copy link
Member

Looks like it, yep. I believe up until now I have been using paths in the form ./vendor/rails, which will work without this patch. Thanks!

indirect pushed a commit that referenced this pull request May 11, 2011
Fix and spec for bug handling relative paths in Gemfile.
@indirect indirect merged commit 4e05fd6 into rubygems:1-0-stable May 11, 2011
@indirect
Copy link
Member

This spec turned out to break all specs that ran after it, because it modified the process running rspec instead of shelling out to a child ruby process like all the other specs do. Fixed in 2dc3f80.

@mbirk
Copy link
Contributor Author

mbirk commented May 11, 2011

Ack, my bad, thanks for quickly accepting the bug fix and cleaning up
the spec!

On 5/11/11 1:04 AM, indirect wrote:

This spec turned out to break all specs that ran after it, because it modified the process running rspec instead of shelling out to a child ruby process like all the other specs do. Fixed in 2dc3f80.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants