diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-09-13 14:01:29 +0200 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-09-13 14:01:29 +0200 |
commit | d453033b19c27640f95cc085d52398342e15472b (patch) | |
tree | 37889b28613d27cee11f384fc225eab1c7df823c /lib/bundler/source/path.rb | |
parent | 695db9a169294ec0c6fef3c14ef0f0ac1f6cc65c (diff) | |
download | bundler-d453033b19c27640f95cc085d52398342e15472b.tar.gz |
[Path] Store lockfile paths relative to the root, not the gemfile path
Diffstat (limited to 'lib/bundler/source/path.rb')
-rw-r--r-- | lib/bundler/source/path.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 69bb0c1af2..4250e55905 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -46,7 +46,7 @@ module Bundler def to_lock out = String.new("PATH\n") - out << " remote: #{relative_path}\n" + out << " remote: #{lockfile_path}\n" out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB out << " specs:\n" end @@ -129,6 +129,11 @@ module Bundler "`#{somepath}`.\nThe error message was: #{e.message}." end + def lockfile_path + return path if path.absolute? + expand(path).relative_path_from(Bundler.root) + end + def app_cache_path(custom_path = nil) @app_cache_path ||= Bundler.app_cache(custom_path).join(app_cache_dirname) end |