Class: Bauble::Cli::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/bauble/cli/config.rb

Overview

app config

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/bauble/cli/config.rb', line 21

def initialize
  @root_dir = Dir.pwd
  @bauble_home = "#{@root_dir}/.bauble"
  @asset_dir = "#{@bauble_home}/assets"
  @pulumi_home = "#{@bauble_home}/.pulumi"
  @gem_layer_asset_dir = "#{@asset_dir}/gem_layer"
  @shared_code_asset_dir = "#{@asset_dir}/shared_app_code"
  @app_stack_name = 'bauble'
  @debug = ENV['BAUBLE_DEBUG'] || false
  @skip_gem_layer = false
  @s3_backend = nil
  set_pulumi_env_vars
end

Instance Attribute Details

#app_nameObject

Returns the value of attribute app_name.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def app_name
  @app_name
end

#app_stack_nameObject

Returns the value of attribute app_stack_name.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def app_stack_name
  @app_stack_name
end

#asset_dirObject

Returns the value of attribute asset_dir.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def asset_dir
  @asset_dir
end

#bauble_homeObject

Returns the value of attribute bauble_home.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def bauble_home
  @bauble_home
end

#debugObject

Returns the value of attribute debug.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def debug
  @debug
end

#gem_layer_asset_dirObject

Returns the value of attribute gem_layer_asset_dir.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def gem_layer_asset_dir
  @gem_layer_asset_dir
end

#pulumi_homeObject

Returns the value of attribute pulumi_home.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def pulumi_home
  @pulumi_home
end

#root_dirObject

Returns the value of attribute root_dir.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def root_dir
  @root_dir
end

#s3_backendObject

Returns the value of attribute s3_backend.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def s3_backend
  @s3_backend
end

#shared_code_asset_dirObject

Returns the value of attribute shared_code_asset_dir.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def shared_code_asset_dir
  @shared_code_asset_dir
end

#skip_gem_layerObject

Returns the value of attribute skip_gem_layer.



7
8
9
# File 'lib/bauble/cli/config.rb', line 7

def skip_gem_layer
  @skip_gem_layer
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:

  • (config)


35
36
37
38
39
# File 'lib/bauble/cli/config.rb', line 35

def self.configure
  config = new
  yield(config) if block_given?
  config
end