class Pronto::Bitbucket
def slug
def slug return @config.bitbucket_slug if @config.bitbucket_slug @slug ||= begin @repo.remote_urls.map do |url| hostname = Regexp.escape(@config.bitbucket_hostname) match = %r{.*#{hostname}(:|\/)(?<slug>.*?)(?:\.git)?\z}.match(url) match[:slug] if match end.compact.first end end