Module: Deploio::Utils

Defined in:
lib/deploio/utils.rb

Class Method Summary collapse

Class Method Details

.detect_git_remoteObject

fetches the git remote of origin in the current directory This is used in different places to auto-detect the app based on the current git remote ala heroku.



5
6
7
8
9
10
# File 'lib/deploio/utils.rb', line 5

def self.detect_git_remote
  stdout, _stderr, status = Open3.capture3("git", "remote", "get-url", "origin")
  status.success? ? stdout.strip : nil
rescue Errno::ENOENT
  nil
end