module Bosh::Workspace::GitProtocolHelper

Public Instance Methods

git_protocol_from_url(url) click to toggle source
# File lib/bosh/workspace/helpers/git_protocol_helper.rb, line 3
def git_protocol_from_url(url)
  case url
  when /^git:/
    return :git
  when /^https:/
    return :https
  when /^http:/
    return :http
  when /(@.+:|^ssh:)/
    return :ssh
  else
    return nil
  end
end