class Heroku::Command::Sharing

manage collaborators on an app

Public Instance Methods

add() click to toggle source

sharing:add EMAIL

add a collaborator to an app

# File lib/heroku/command/sharing.rb, line 22
def add
  email = args.shift.downcase rescue ''
  raise(CommandFailed, "Specify an email address to share the app with.") if email == ''
  display heroku.add_collaborator(app, email)
end
index() click to toggle source

sharing

list collaborators on an app

# File lib/heroku/command/sharing.rb, line 13
def index
  list = heroku.list_collaborators(app)
  display list.map { |c| c[:email] }.join("\n")
end
remove() click to toggle source

sharing:remove EMAIL

remove a collaborator from an app

# File lib/heroku/command/sharing.rb, line 32
def remove
  email = args.shift.downcase rescue ''
  raise(CommandFailed, "Specify an email address to remove from the app.") if email == ''
  heroku.remove_collaborator(app, email)
  display "Collaborator removed."
end
transfer() click to toggle source

sharing:transfer EMAIL

transfer an app to a new owner

# File lib/heroku/command/sharing.rb, line 43
def transfer
  email = args.shift.downcase rescue ''
  raise(CommandFailed, "Specify the email address of the new owner") if email == ''
  heroku.update(app, :transfer_owner => email)
  display "App ownership transfered. New owner is #{email}"
end