Skip to content

Instantly share code, notes, and snippets.

@urfolomeus
Last active August 29, 2015 14:03
Show Gist options
  • Save urfolomeus/1cecf1fcfc9cc0e8f6e3 to your computer and use it in GitHub Desktop.
Save urfolomeus/1cecf1fcfc9cc0e8f6e3 to your computer and use it in GitHub Desktop.
##heroku
alias hp="heroku_helper production"
alias hs="heroku_helper staging"
alias hpc="heroku_helper production run console"
alias hpl="heroku_helper production logs"
alias hprdbm="heroku_helper production run rake db:migrate"
alias hsc="heroku_helper staging run console"
alias hsl="heroku_helper staging logs"
alias hsrdbm="heroku_helper staging run rake db:migrate"
#!/usr/bin/env ruby
class String
def urlize
self.gsub(/[^a-zA-Z-]/, '-')
end
end
env, command_name, *args = ARGV
env = nil if env == 'production'
app = Dir.pwd.split('/').last.urlize
app << "-#{env}" if env
command = "heroku #{command_name} #{args.join(' ')} --app #{app}"
puts command
exec command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment