lib/unwrappr/researchers/github_repo.rb in unwrappr-0.3.5 vs lib/unwrappr/researchers/github_repo.rb in unwrappr-0.4.0

- old
+ new

@@ -5,10 +5,13 @@ # Checks the gem metadata to obtain a Github source repository if available. # # Implements the `gem_researcher` interface required by the # LockFileAnnotator. class GithubRepo - GITHUB_URI_PATTERN = %r{^https?://github.com/(?<repo>[^/]+/[^/]+)}i.freeze + GITHUB_URI_PATTERN = %r{^https?:// + github.com/ + (?<repo>[^/]+/[[:alnum:]_.-]+) + }ix.freeze def research(_gem_change, gem_change_info) repo = match_repo(gem_change_info, :source_code_uri) || match_repo(gem_change_info, :homepage_uri) gem_change_info.merge(github_repo: repo)