Sha256: 91df4ca82f97181cb2503c72e69231f83a282a041f365473a9e91cc804f1044b

Contents?: true

Size: 1.1 KB

Versions: 18

Compression:

Stored size: 1.1 KB

Contents

module Brightbox
  desc "Lists accounts you can access (when using user credentials)"
  command [:"account-access"] do |cmd|
    cmd.default_command :list

    cmd.desc "List your collaborations"
    cmd.arg_name "[collaboration-id...]"
    cmd.command [:list] do |c|
      c.action do |global_options, _options, args|
        collaborations = if args.empty?
                           UserCollaboration.find(:all)
                         else
                           UserCollaboration.find_or_call(args) do |id|
                             warn "Couldn't find collaboration #{id}"
                           end
                         end
        render_table(collaborations, global_options)
      end
    end

    cmd.desc "Show details of collaborations"
    cmd.arg_name "[collaboration-id...]"
    cmd.command [:show] do |c|
      c.action do |global_options, _options, args|
        collaborations = UserCollaboration.find_or_call(args) do |id|
          warn "Couldn't find collaboration #{id}"
        end
        render_table(collaborations, global_options.merge(:vertical => true))
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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