Sha256: 05a4cbdd9c83e543ea83f709d96639c788fa03b7a2eebcccf018a89b2b3cd59a
Contents?: true
Size: 649 Bytes
Versions: 37
Compression:
Stored size: 649 Bytes
Contents
module OhlohScm::Adapters class HgAdapter < AbstractAdapter def self.url_regex /^((http|https|ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)?[A-Za-z0-9_@\-\.\/\~\+]*$/ end def self.public_url_regex /^(http|https):\/\/(\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/[A-Za-z0-9_\-\.\/\~\+]*$/ end def validate_server_connection return unless valid? @errors << [:failed, "The server did not respond to the 'hg id' command. Is the URL correct?"] unless self.exist? end def guess_forge u = @url =~ /:\/\/(.*\.?hg\.)?([^\/^:]+)(:\d+)?\// ? $2 : nil case u when /(sourceforge\.net$)/ $1 else u end end end end
Version data entries
37 entries across 37 versions & 1 rubygems