Skip to content

Commit

Permalink
drop .git from github project name
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Aug 25, 2015
1 parent f0b1e1d commit 9ebfdb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def github_infos(gem)
end

def github_name(gem)
return $1 if gem[:spec].homepage =~ %r{github.com/([^/]+/[^/]+)}
return $1 if gem[:spec].homepage =~ %r{github.com/([^/]+/[^/]+?)(\.git)?}
JSON.parse(Net::HTTP.get(URI("https://rubygems.org/api/v1/gems/#{gem[:name]}.json"))).each do |k,v|
return $1 if k =~ /_uri/ && v =~ %r{github.com/([^/]+/[^/]+)}
return $1 if k =~ /_uri/ && v =~ %r{github.com/([^/]+/[^/]+?)(\.git)?}
end
nil
end
Expand Down

0 comments on commit 9ebfdb4

Please sign in to comment.