Sha256: 783e4b44da18a27a98cb5497ad95f1c2db223e007088c23cda7b7ce353b51afc

Contents?: true

Size: 477 Bytes

Versions: 28

Compression:

Stored size: 477 Bytes

Contents

require_relative '../common'

module Kontena::Cli::Grids::Users
  class ListCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::Grids::Common

    def execute
      require_api_url
      token = require_token
      result = client(token).get("grids/#{current_grid}/users")
      puts "%-40s %-40s" % ['Email', 'Name']
      result['users'].each { |user|
        puts "%-40.40s %-40.40s" % [user['email'], user['name']]
      }
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.4 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.3 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.2 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.1 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.0 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.7 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.6 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.5 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.4 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.3 lib/kontena/cli/grids/users/list_command.rb
kontena-cli-0.14.2 lib/kontena/cli/grids/users/list_command.rb