From 4b67edf0db55bf31a06cfd35a19b462f9e5f4cdf Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Mon, 17 Jun 2019 18:35:00 -0700 Subject: [PATCH] relax github.com regex to allow for more branch names --- spec/license_meta_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/license_meta_spec.rb b/spec/license_meta_spec.rb index 09bf62c..f5d58c6 100644 --- a/spec/license_meta_spec.rb +++ b/spec/license_meta_spec.rb @@ -56,7 +56,7 @@ describe 'license meta' do let(:detected) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE').license } if example_url.start_with?('https://github.com/') - example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w\.-]+)/blob/([\w-]+/\S+)\z}, 'https://raw.githubusercontent.com/\1/\2') + example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w\.-]+)/blob/(\S+)\z}, 'https://raw.githubusercontent.com/\1/\2') elsif example_url.start_with?('https://git.savannah.gnu.org/', 'https://git.gnome.org/') example_url.gsub!(%r{/tree/}, '/plain/') elsif example_url.start_with?('https://bitbucket.org/')