class DeployS3::Remote

Public Class Methods

comparison(from, to) click to toggle source
# File lib/deploy_s3/remote.rb, line 3
def self.comparison(from, to)
  origin_url = `git config --get remote.origin.url`.chomp

  github_url = self.github_from_url origin_url
  "#{github_url}/compare/#{from}...#{to}" if github_url
end
github_from_url(url) click to toggle source
# File lib/deploy_s3/remote.rb, line 10
def self.github_from_url(url)
  if url =~ /git@github.com:(.*?).git/
    "https://github.com/#{$1}"
  elsif url =~ /(.*?):\/\/github.com\/(.*?).git/
    "https://github.com/#{$1}"
  end
end