Created
November 24, 2009 20:23
-
-
Save ivanacostarubio/242178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
remote = extract_option('--remote', 'heroku') | |
name = args.shift.downcase.strip rescue nil | |
name = heroku.create(name, {}) | |
display "Created #{app_urls(name)}" | |
if remote || File.exists?(Dir.pwd + '/.git') | |
remote ||= 'heroku' | |
return if shell('git remote').split("\n").include?(remote) | |
shell "git remote add #{remote} git@#{heroku.host}:#{name}.git" | |
display "Git remote #{remote} added" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment