Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (35 sloc) 0.984 kb
require 'kumade/deployer'
class Kumade
def self.load_tasks
deployer.load_tasks
end
def self.load_namespaced_tasks
deployer.load_namespaced_tasks
end
def self.deployer
@deployer ||= Deployer.new
end
class << self
attr_writer :staging_remote, :production_remote
attr_accessor :staging_app, :production_app
def reset!
@staging_remote = nil
@production_remote = nil
@staging_app = nil
@production_app = nil
end
def staging_remote
@staging_remote ||= local_remote_for_app(Kumade.staging_app)
end
def production_remote
@production_remote ||= local_remote_for_app(Kumade.production_app)
end
def local_remote_for_app(app_name)
heroku_remote_url = heroku_remote_url_for_app(app_name)
`git remote -v | grep push | grep '#{heroku_remote_url}' | cut -f1`.strip
end
def heroku_remote_url_for_app(app_name)
"git@heroku.com:#{app_name}.git"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.