Sha256: be5747eafc39a5bc8565a811bd7829a9775a3a6c9ed572d4bf22228ac7df4d63

Contents?: true

Size: 603 Bytes

Versions: 14

Compression:

Stored size: 603 Bytes

Contents

module Brightbox
  desc I18n.t("accounts.desc")
  command [:accounts] do |cmd|
    cmd.desc I18n.t("accounts.accept_invite.desc")
    cmd.arg_name "account_id"
    cmd.command [:accept_invite] do |c|
      c.action do |global_options, _options, args|
        account_id = args.first

        # Find the collaboration for that account
        collaboration = UserCollaboration.get_for_account(account_id)
        raise "Couldn't find an invite for account #{account_id}" unless collaboration

        collaboration.accept
        render_table([collaboration], global_options)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
brightbox-cli-4.8.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/accounts/accept_invite.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/accounts/accept_invite.rb