Skip to content

Commit

Permalink
Extract DEFAULT_REMOTE
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbrainard committed Oct 15, 2014
1 parent 81bcb0d commit f572b99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/heroku/command/git.rb
Expand Up @@ -4,6 +4,8 @@
#
class Heroku::Command::Git < Heroku::Command::Base

DEFAULT_REMOTE = 'heroku'

# git:clone APP [DIRECTORY]
#
# clones a heroku app to your local machine at DIRECTORY (defaults to app name)
Expand All @@ -21,7 +23,7 @@ class Heroku::Command::Git < Heroku::Command::Base
# ...
#
def clone
remote = options[:remote] || "heroku"
remote = options[:remote] || DEFAULT_REMOTE

name = options[:app] || shift_argument || error("Usage: heroku git:clone APP [DIRECTORY]")
directory = shift_argument
Expand Down Expand Up @@ -54,7 +56,7 @@ def clone
# Git remote heroku added
#
def remote
remote = options[:remote] || 'heroku'
remote = options[:remote] || DEFAULT_REMOTE
app_data = api.get_app(app).body
git_url = if options[:http_git]
"https://#{Heroku::Auth.http_git_host}/#{app_data['name']}.git"
Expand Down

0 comments on commit f572b99

Please sign in to comment.