lib/codestatus/repository_resolver/rubygems_resolver.rb in codestatus-0.1.0 vs lib/codestatus/repository_resolver/rubygems_resolver.rb in codestatus-0.1.1
- old
+ new
@@ -1,10 +1,10 @@
require "gems"
module Codestatus
class RepositoryResolver
class RubygemsResolver
- GITHUB_REPOSITORY_REGEXP = %r{https://github.com/(?<owner>.*)/(?<repo>.*)/?.*}.freeze
+ GITHUB_REPOSITORY_REGEXP = %r{(https|git)://github.com/(?<owner>[^/]*)/(?<repo>[^/]*)(\.git)?/?.*}.freeze
def resolve(registry:, package:)
return unless registry.to_s == 'rubygems'
@package = package