We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f193b06 commit 612d68fCopy full SHA for 612d68f
1 file changed
Gemfile
@@ -1,10 +1,16 @@
1
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
3
+require 'uri'
4
+
5
def location_for(place)
6
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
7
[{ :git => $1, :branch => $2, :require => false }]
- elsif place =~ /^file:\/\/(.*)/
- ['>= 0', { :path => File.expand_path($1), :require => false }]
8
+ elsif place.start_with?('file://')
9
+ path = URI(place).path
10
+ path = path.sub(%r{^/([A-Za-z]:/)}i, '\1')
11
+ path = File.expand_path(path)
12
13
+ ['>= 0', { path: path, require: false }]
14
else
15
[place, { :require => false }]
16
end
0 commit comments