Module: EYCli::GitUtils

Included in:
Controller::Apps
Defined in:
lib/ey_cli/git_utils.rb

Instance Method Summary collapse

Instance Method Details

#fetch_repository(base) ⇒ Object



7
8
9
10
# File 'lib/ey_cli/git_utils.rb', line 7

def fetch_repository(base)
  config = File.join(base, '.git', 'config')
  `git config -f #{config} --get 'remote.origin.url'`.chomp
end

#git_repository?(base) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/ey_cli/git_utils.rb', line 3

def git_repository?(base)
  File.exist?(File.join(base, '.git'))
end