Skip to content

Commit

Permalink
Check cloneable by git
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin21 committed Jan 1, 2018
1 parent cdaab79 commit 2bdfc81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ This requires ghq (https://github.com/motemen/ghq) to be installed, and either o

1) `GEMSRC_USE_GHQ` environment variable
2) add `gemsrc_use_ghq` configuration in your .gemrc
3) Install nmap command needed for checking that URL is cloneable by git

The directory structure should be like below in this mode.

Expand Down
1 change: 1 addition & 0 deletions lib/rubygems_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def git_clone(repository)
return if @tested_repositories.include? repository
@tested_repositories << repository
return if github?(repository) && !github_page_exists?(repository)
return unless `nmap -sT -p 9418 #{URI.parse(repository).host}` =~ /open/

puts "gem-src: #{installer.spec.name} - Cloning from #{repository}..." if verbose?

Expand Down

0 comments on commit 2bdfc81

Please sign in to comment.