Sha256: 9e1ea542078a3ed523e91edee20054c5112f14633e77e8d9144e6b72419d8977

Contents?: true

Size: 451 Bytes

Versions: 26

Compression:

Stored size: 451 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Grids
  class ListUsersCommand < Clamp::Command
    include Kontena::Cli::Common
    include 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

26 entries across 26 versions & 1 rubygems

Version Path
kontena-cli-0.12.3 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.12.2 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.12.1 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.12.0 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.7 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.6 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.5 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.4 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.3 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.2 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.1 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.11.0 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.10.3 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.10.2 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.10.1 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.10.0 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.9.3 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.9.2 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.9.1 lib/kontena/cli/grids/list_users_command.rb
kontena-cli-0.9.0 lib/kontena/cli/grids/list_users_command.rb