Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that relativize supports :path that is CWD (".") #82

Closed
sikachu opened this issue Jan 2, 2015 · 1 comment
Closed

Make sure that relativize supports :path that is CWD (".") #82

sikachu opened this issue Jan 2, 2015 · 1 comment
Assignees
Milestone

Comments

@sikachu
Copy link
Contributor

sikachu commented Jan 2, 2015

See #76. Basically:

The vagrant plugin development guide uses gem "my-plugin", path: "." instead of gemspec.

source 'https://rubygems.org'

group :development do
  gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
  gem 'appraisal', '~> 1.0'
end

group :plugins do
  gem "vagrant-rackspace", path: "."
end

This doesn't work either, probably because support for rewriting path wasn't completed/merged (#19). The result:

$ bundle exec appraisal install
bundle check --gemfile='/Users/Thoughtworker/repos/rackspace/vagrant-rackspace/gemfiles/latest_stable.gemfile' || bundle install --gemfile='/Users/Thoughtworker/repos/rackspace/vagrant-rackspace/gemfiles/latest_stable.gemfile'
Resolving dependencies...
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Could not find gem 'vagrant-rackspace (>= 0) ruby' in source at ..
Source does not contain any versions of 'vagrant-rackspace (>= 0) ruby'
@sikachu sikachu added this to the v1.1.0 milestone Jan 2, 2015
@sikachu sikachu added the next-up label Jan 2, 2015
@sikachu sikachu self-assigned this Jan 2, 2015
@sikachu sikachu modified the milestones: v1.0.3, v1.1.0 Jan 2, 2015
@sikachu
Copy link
Contributor Author

sikachu commented Jan 5, 2015

I've confirm the bug — this is because we don't do path rewrite on the generated gemfile. So, for example, I have this Gemfile:

source "https://rubygems.org"

gem "appraisal"

group :plugin do
  gem "test", path: "."
end

And this is what's in the generated gemfile:

# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"

group :plugin do
  gem "test", :path => "."
end

We should actually lookout for path key on the DSL method that supports it.

@sikachu sikachu closed this as completed in 1d3885c Mar 4, 2015
sikachu pushed a commit that referenced this issue Mar 4, 2015
Appraisal now correctly prefix relative paths in these directives:

* `gem` directive (`:path` and `:git` option)
* `path` directive
* `git` directive

Fix #82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant