Skip to content

Commit

Permalink
Merge pull request heroku#8 from ricaurte/master
Browse files Browse the repository at this point in the history
Needed Vulcan to work with Heroku-Accounts plugin so I made this patch
  • Loading branch information
ddollar committed Jan 25, 2012
2 parents 92b0ede + 6410c21 commit de0e4d3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/vulcan/cli.rb
Expand Up @@ -129,7 +129,7 @@ def index
error "invalid api key detected, try running `heroku credentials`" if api_key =~ / /

system "git init"
system "git remote add heroku git@heroku.com:#{config[:app]}.git"
system "git remote add heroku git@#{heroku_git_domain}:#{config[:app]}.git"
FileUtils.cp_r "#{server_path}/.", "."
File.open(".gitignore", "w") do |file|
file.puts ".env"
Expand Down Expand Up @@ -179,5 +179,16 @@ def error(message)
def server_path
File.expand_path("../../../server", __FILE__)
end

#
# heroku_git_domain checks to see if the heroku-accounts plugin is present,
# and if so, it will set the domain to the one that matches the credentials
# for the currently set account
#
def heroku_git_domain
suffix = %x{ git config heroku.account }
suffix = "com" if suffix.nil? or suffix.strip == ""
"heroku.#{suffix.strip}"
end

end

0 comments on commit de0e4d3

Please sign in to comment.