Skip to content

Commit 5e56163

Browse files
author
Ciprian Badescu
committed
(maint) update Gemfile locate_for
update Gemfile locate_for to accept https git URLs
1 parent e2ca21e commit 5e56163

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
33
gemspec
44

55
def location_for(place, fake_version = nil)
6-
if place.is_a?(String) && place =~ /^(git[:@][^#]*)#(.*)/
6+
if place.is_a?(String) && place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
77
[fake_version, { git: $1, branch: $2, require: false }].compact
88
elsif place.is_a?(String) && place =~ /^file:\/\/(.*)/
99
['>= 0', { path: File.expand_path($1), require: false }]

acceptance/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
44

55
def location_for(place, fake_version = nil)
6-
if place.is_a?(String) && place =~ /^(git:[^#]*)#(.*)/
6+
if place.is_a?(String) && place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
77
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
88
elsif place.is_a?(String) && place =~ /^file:\/\/(.*)/
99
['>= 0', { :path => File.expand_path($1), :require => false }]

0 commit comments

Comments
 (0)