Class: DeployS3::Remote
- Inherits:
-
Object
- Object
- DeployS3::Remote
- Defined in:
- lib/deploy_s3/remote.rb
Class Method Summary collapse
Class Method Details
.comparison(from, to) ⇒ Object
3 4 5 6 7 8 |
# 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) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/deploy_s3/remote.rb', line 10 def self.github_from_url(url) if url =~ /[email protected]:(.*?).git/ "https://github.com/#{$1}" elsif url =~ /(.*?):\/\/github.com\/(.*?).git/ "https://github.com/#{$1}" end end |