Sha256: c76b0dea97e919f33d517ac22db9155381dfbc0d624a427efc353f8f654a3ef7

Contents?: true

Size: 588 Bytes

Versions: 77

Compression:

Stored size: 588 Bytes

Contents

require_relative '../services_helper'

module Kontena::Cli::Services::Envs
  class ListCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include Kontena::Cli::Services::ServicesHelper
    include Kontena::Cli::TableGenerator::Helper

    parameter "NAME", "Service name"

    requires_current_master
    requires_current_master_token

    def execute
      service = client.get("services/#{parse_service_id(name)}")
      service["env"].sort.each do |env|
        puts quiet? ? env.split('=', 2).first : env
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.10 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.9 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.8 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.7 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.6 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.5 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.4 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.3 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.2 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.1 lib/kontena/cli/services/envs/list_command.rb
krates-1.7.0 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.9 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.8 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.7 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.6 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.5 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.4 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.3 lib/kontena/cli/services/envs/list_command.rb
krates-1.6.2 lib/kontena/cli/services/envs/list_command.rb