Class: Jets::CLI::Env::List

Inherits:
Base show all
Defined in:
lib/jets/cli/env/list.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Util::Truthy

#truthy?

Methods included from Lambda::Checks

#check_deployed!, #check_workers!, #workers_deployed?

Methods inherited from Base

#initialize, #paginate, #paging_params, rescue_api_error

Methods included from Util::Logging

#log

Methods included from AwsServices

#apigateway, #aws_options, #cfn, #codebuild, #dynamodb, #lambda_client, #logs, #s3, #s3_resource, #sns, #sqs, #ssm, #sts, #wafv2

Methods included from AwsServices::StackStatus

#output_value, #stack_exists?

Methods included from AwsServices::GlobalMemoist

included, #reset_cache!

Methods included from Api

#api, #api_key

Constructor Details

This class inherits a constructor from Jets::CLI::Env::Base

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/jets/cli/env/list.rb', line 3

def run
  warn "# Env Variables for #{Jets.project.namespace}"
  unless @options[:reveal]
    warn "# To show values also, use the --reveal option"
  end
  vars = @lambda_function.environment_variables

  presenter = CliFormat::Presenter.new(@options)
  vars.each do |key, value|
    row = [key]
    row << value if @options[:reveal]
    presenter.rows << row
  end
  presenter.show
end