manage plugins to the heroku gem
plugins
list installed plugins
# File lib/heroku/command/plugins.rb, line 12 def index ::Heroku::Plugin.list.each do |plugin| display plugin end end
plugins:install URL
install a plugin
# File lib/heroku/command/plugins.rb, line 22 def install plugin = Heroku::Plugin.new(args.shift) if plugin.install begin Heroku::Plugin.load_plugin(plugin.name) rescue Exception => ex installation_failed(plugin, ex.message) end display "#{plugin} installed" else error "Could not install #{plugin}. Please check the URL and try again" end end
plugins:uninstall PLUGIN
uninstall a plugin
# File lib/heroku/command/plugins.rb, line 40 def uninstall plugin = Heroku::Plugin.new(args.shift) if plugin.uninstall display("#{plugin.name} uninstalled") else error(%Q{Plugin "#{plugin.name}" not found.}) end end
# File lib/heroku/command/plugins.rb, line 51 def installation_failed(plugin, message) plugin.uninstall error "Could not initialize #{plugin}: #{message} Are you attempting to install a Rails plugin? If so, use the following: Rails 2.x: script/plugin install #{plugin.uri} Rails 3.x: rails plugin install #{plugin.uri} " end