bauble_core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6928636a53aa5a88ae8f1da06e9ab3b50fb9fefba2c4ff2684c69adcdb68031e
4
+ data.tar.gz: 6af981f1f1f607547c09121b3105d14f4ae552af178b6592c9d8d7982b07a294
5
+ SHA512:
6
+ metadata.gz: a4ac5e9706f526df8752dbebf54a0c2f4fd99661b4302d60177d2e7dd4d4e54c7996329888ddc2d57c088f4d858b21db0f30dab3ec3992f23135e0c3ffd9e0e7
7
+ data.tar.gz: 7c99a753835fc040bc28bf146beb40c9e1f20c8938eefca59b03b2646f554ff7aa73801752fd7e02f21cc4808975d5d83f273b1f884d42ef16c307317049d0b2
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-09-25
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 37553025+la-jamesh@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 James Hoegerl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Bauble
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bauble`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bauble. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/bauble/blob/main/CODE_OF_CONDUCT.md).
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the Bauble project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/bauble/blob/main/CODE_OF_CONDUCT.md).
data/exe/bauble ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/bauble/cli/cli'
4
+
5
+ Bauble::Cli::BaubleCli.start(ARGV)
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'resources/s3_bucket'
4
+ require_relative 'resources/lambda_role'
5
+ require_relative 'stack'
6
+ require_relative 'cli/logger'
7
+ require 'yaml'
8
+ require 'digest'
9
+
10
+ module Bauble
11
+ # A Bauble application
12
+ class Application
13
+ attr_accessor(
14
+ :resources,
15
+ :stacks,
16
+ :current_stack,
17
+ :name,
18
+ :config,
19
+ :code_dir,
20
+ :bundle_hash,
21
+ :shared_code_dir,
22
+ :skip_gem_layer
23
+ )
24
+
25
+ def initialize(name:, stacks: [], code_dir: nil, skip_gem_layer: false)
26
+ @resources = []
27
+ @stacks = []
28
+ @name = name
29
+ @shared_code_dir = code_dir
30
+ @skip_gem_layer = skip_gem_layer
31
+ add_gem_layer unless skip_gem_layer
32
+ stacks = ['dev'] if stacks.empty?
33
+ stacks.each do |stack|
34
+ Stack.new(self, stack)
35
+ end
36
+ end
37
+
38
+ def add_resource(resource)
39
+ @resources << resource
40
+ end
41
+
42
+ def add_stack(stack)
43
+ @stacks << stack
44
+ end
45
+
46
+ def template
47
+ @template ||= synthesize_template
48
+ end
49
+
50
+ def add_gem_layer
51
+ Bauble::Resources::GemLayer.new(self)
52
+ end
53
+
54
+ def change_current_stack(stack_name)
55
+ @current_stack = @stacks.find { |stack| stack.name == stack_name }
56
+ end
57
+
58
+ def bundle
59
+ # TODO: this potentially need to be a hash of more resources I'm not sure yet'
60
+ @bundle_hash = generate_unique_string("#{Dir.pwd}/app")
61
+ create_shared_code
62
+ @resources.each(&:bundle)
63
+ end
64
+
65
+ private
66
+
67
+ def create_shared_code
68
+ return unless @shared_code_dir
69
+
70
+ destination_dir = File.join(config.asset_dir, @bundle_hash, 'shared_app_code', File.basename(@shared_code_dir))
71
+ FileUtils.mkdir_p(destination_dir)
72
+ FileUtils.cp_r(Dir.glob(File.join(@shared_code_dir, '*')), destination_dir)
73
+ end
74
+
75
+ def synthesize_template
76
+ all_resources = @resources.map(&:synthesize).reduce({}, :merge)
77
+ template = base_template
78
+ template['resources'] = all_resources
79
+ template.to_yaml
80
+ end
81
+
82
+ def base_template
83
+ {
84
+ 'name' => @name,
85
+ 'runtime' => 'yaml',
86
+ 'resources' => {}
87
+ }
88
+ end
89
+
90
+ def generate_unique_string(directory)
91
+ files = Dir.glob("#{directory}/**/*").select { |file| File.file?(file) }
92
+ content_hash = files.map { |file| Digest::SHA256.file(file).hexdigest }.join
93
+ Digest::SHA256.hexdigest(content_hash)
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bauble
4
+ module Cli
5
+ # bundle command builder
6
+ class BundleCommandBuilder
7
+ def initialize
8
+ @commands = []
9
+ end
10
+
11
+ def with_bundle_without(groups)
12
+ @commands << "bundle config set without #{groups.join(' ')}"
13
+ self
14
+ end
15
+
16
+ def with_bundle_path(bundle_hash)
17
+ @commands << "bundle config set path \".bauble/assets/#{bundle_hash}/gem-layer\""
18
+ self
19
+ end
20
+
21
+ def with_bauble_gem_override
22
+ @commands << 'bundle config local.bauble_core /var/task/bauble_core'
23
+ self
24
+ end
25
+
26
+ def with_bundle_install
27
+ @commands << 'bundle install'
28
+ self
29
+ end
30
+
31
+ def with_dot_bundle_cleanup
32
+ @commands << 'rm -rf .bundle'
33
+ self
34
+ end
35
+
36
+ def build
37
+ @commands.join(' && ')
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'config'
4
+ require 'thor'
5
+ require 'json'
6
+ require_relative 'commands/preview'
7
+ require_relative 'commands/up'
8
+ require_relative 'commands/destroy'
9
+ require_relative 'pulumi'
10
+ require_relative '../application'
11
+
12
+ module Bauble
13
+ module Cli
14
+ # Bauble CLI
15
+ class BaubleCli < Thor
16
+ include Commands::Preview
17
+ include Commands::Up
18
+ include Commands::Destroy
19
+
20
+ attr_accessor :app, :config
21
+
22
+ def initialize(*args)
23
+ super
24
+ require_entrypoint
25
+ @app = ObjectSpace.each_object(Bauble::Application).first
26
+ raise 'No App instance found' unless @app
27
+
28
+ build_config
29
+ end
30
+
31
+ def self.exit_on_failure?
32
+ true
33
+ end
34
+
35
+ private
36
+
37
+ def pulumi
38
+ @pulumi ||= Bauble::Cli::Pulumi.new(config: config)
39
+ end
40
+
41
+ def build_config
42
+ @config = Config.configure do |c|
43
+ c.app_name = @app.name
44
+ c.skip_gem_layer = @app.skip_gem_layer
45
+ end
46
+ @app.config = @config
47
+ end
48
+
49
+ def write_stack_template(stack)
50
+ create_directory
51
+ # TODO: this can probably be put into something smarter, maube a file writing class?
52
+ File.open("#{config.pulumi_home}/Pulumi.#{stack.name}.yaml", 'w') { |file| file.write(stack.template) }
53
+ end
54
+
55
+ def create_directory
56
+ FileUtils.mkdir_p(config.pulumi_home)
57
+ end
58
+
59
+ def bauble_json
60
+ @bauble_json ||= JSON.parse(File.read('bauble.json'))
61
+ end
62
+
63
+ def require_entrypoint
64
+ # TODO: We should probably use a config value here instead of Dir.pwd
65
+ require "#{Dir.pwd}/#{bauble_json['entrypoint']}"
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'logger'
4
+ require 'English'
5
+ require_relative 'docker_command_builder'
6
+ require_relative 'bundle_command_builder'
7
+
8
+ module Bauble
9
+ module Cli
10
+ # bundle code
11
+ class CodeBundler
12
+ class << self
13
+ def docker_bundle_gems(bundle_hash:)
14
+ IO.popen("#{docker_build_gems_command(bundle_hash)} 2>&1") do |io|
15
+ io.each do |line|
16
+ Logger.docker(line)
17
+ end
18
+ end
19
+
20
+ return if $CHILD_STATUS.success?
21
+
22
+ `rm -rf .bundle`
23
+ Logger.error('Bundle step failed')
24
+ exit
25
+ end
26
+
27
+ private
28
+
29
+ # TODO: Remove the need for this to install things from the sub dir
30
+ def docker_build_gems_command(bundle_hash)
31
+ command = DockerCommandBuilder
32
+ .new
33
+ .with_rm
34
+ .with_volume('$(pwd):/var/task')
35
+ .with_workdir('/var/task')
36
+ .with_entrypoint('/bin/sh')
37
+ .with_platform('linux/amd64')
38
+
39
+ if ENV['BAUBLE_DEV_GEM_PATH']
40
+ command = command.with_volume("#{ENV['BAUBLE_DEV_GEM_PATH']}:/var/task/bauble_core")
41
+ end
42
+
43
+ command.with_image('public.ecr.aws/sam/build-ruby3.2')
44
+ .with_command(bundle_command(bundle_hash))
45
+ .build
46
+ end
47
+
48
+ def bundle_command(bundle_hash)
49
+ command = BundleCommandBuilder
50
+ .new
51
+ .with_bundle_without(%w[test development])
52
+ .with_bundle_path(bundle_hash)
53
+
54
+ command.with_bauble_gem_override if ENV['BAUBLE_DEV_GEM_PATH']
55
+
56
+ command.with_bundle_install
57
+ .with_dot_bundle_cleanup
58
+ .build
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+ require_relative '../pulumi'
5
+ require_relative '../logger'
6
+
7
+ module Bauble
8
+ module Cli
9
+ module Commands
10
+ # Up command
11
+ module Destroy
12
+ class << self
13
+ def included(thor)
14
+ thor.class_eval do
15
+ desc 'destroy', 'Destroy the application'
16
+ method_option :stack, type: :string, desc: 'The stack to destroy', aliases: '-s'
17
+
18
+ def destroy
19
+ Logger.logo
20
+ Logger.nl
21
+
22
+ # check for any stacks
23
+ raise 'No stacks found' if @app.stacks.empty?
24
+
25
+ # check for multiple stacks
26
+ if @app.stacks.length > 1 && options[:stack].nil?
27
+ Log.error 'Must provide a stack when multiple are defined'
28
+ exit(1)
29
+ end
30
+
31
+ unless yes?('Are you sure you want to destroy the application? [y/N]')
32
+ Logger.log('Destroy aborted')
33
+ exit(0)
34
+ end
35
+
36
+ Logger.block_log('Destroying application...')
37
+
38
+ # set up stack
39
+ stack_name = options[:stack] || @app.stacks.first.name
40
+ @app.change_current_stack(stack_name)
41
+
42
+ # initialize pulumi
43
+ pulumi.init!
44
+
45
+ # create or select stack
46
+ pulumi.create_or_select_stack(stack_name)
47
+
48
+ # destroy the stack
49
+ pulumi.destroy
50
+ Logger.log "Destroy complete\n"
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+ require_relative '../pulumi'
5
+ require_relative '../logger'
6
+
7
+ module Bauble
8
+ module Cli
9
+ module Commands
10
+ # Preview command
11
+ module Preview
12
+ class << self
13
+ def included(thor)
14
+ thor.class_eval do
15
+ desc 'preview', 'Preview the application'
16
+ method_option :stack, type: :string, desc: 'The stack to preview', aliases: '-s'
17
+
18
+ def preview
19
+ Logger.logo
20
+
21
+ # check for any stacks
22
+ raise 'No stacks found' if @app.stacks.empty?
23
+
24
+ # check for multiple stacks
25
+ if @app.stacks.length > 1 && options[:stack].nil?
26
+ Log.error 'Must provide a stack when multiple are defined'
27
+ exit(1)
28
+ end
29
+
30
+ # set up stack
31
+ stack_name = options[:stack] || @app.stacks.first.name
32
+ @app.change_current_stack(stack_name)
33
+
34
+ # bundle assets
35
+ Logger.block_log 'Bundling assets...'
36
+ Logger.nl
37
+ @app.bundle
38
+
39
+ # write template file
40
+ pulumi.create_pulumi_yml(@app.template)
41
+
42
+ # initialize pulumi
43
+ pulumi.init!
44
+
45
+ # create or select stack
46
+ Logger.block_log('Running Pulumi preview...')
47
+ pulumi.create_or_select_stack(stack_name)
48
+
49
+ # run preview
50
+ pulumi.preview
51
+ Logger.log "Preview complete\n"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+ require_relative '../pulumi'
5
+ require_relative '../logger'
6
+
7
+ module Bauble
8
+ module Cli
9
+ module Commands
10
+ # Up command
11
+ module Up
12
+ class << self
13
+ def included(thor)
14
+ thor.class_eval do
15
+ desc 'up', 'Deploy the application'
16
+ method_option :stack, type: :string, desc: 'The stack to stand up', aliases: '-s'
17
+
18
+ def up
19
+ Logger.logo
20
+
21
+ # check for any stacks
22
+ raise 'No stacks found' if @app.stacks.empty?
23
+
24
+ # check for multiple stacks
25
+ if @app.stacks.length > 1 && options[:stack].nil?
26
+ Log.error 'Must provide a stack when multiple are defined'
27
+ exit(1)
28
+ end
29
+
30
+ # set up stack
31
+ stack_name = options[:stack] || @app.stacks.first.name
32
+ @app.change_current_stack(stack_name)
33
+
34
+ # bundle assets
35
+ Logger.block_log 'Bundling assets...'
36
+ Logger.nl
37
+ @app.bundle
38
+
39
+ # write template file
40
+ pulumi.create_pulumi_yml(@app.template)
41
+
42
+ # initialize pulumi
43
+ pulumi.init!
44
+
45
+ # create or select stack
46
+ pulumi.create_or_select_stack(stack_name)
47
+
48
+ # deploy the rest
49
+ Logger.block_log 'Deploying application resources...'
50
+ pulumi.up
51
+
52
+ # log completion
53
+ Logger.log "Up complete\n"
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bauble
4
+ module Cli
5
+ # app config
6
+ class Config
7
+ attr_accessor(
8
+ :app_name,
9
+ :bauble_home,
10
+ :pulumi_home,
11
+ :app_stack_name,
12
+ :debug,
13
+ :asset_dir,
14
+ :root_dir,
15
+ :skip_gem_layer
16
+ )
17
+
18
+ def initialize
19
+ @root_dir = Dir.pwd
20
+ @bauble_home = "#{@root_dir}/.bauble"
21
+ @asset_dir = "#{@bauble_home}/assets"
22
+ @pulumi_home = "#{@bauble_home}/.pulumi"
23
+ @app_stack_name = 'bauble'
24
+ @debug = ENV['BAUBLE_DEBUG'] || false
25
+ @skip_gem_layer = false
26
+ set_pulumi_env_vars
27
+ end
28
+
29
+ def self.configure
30
+ config = new
31
+ yield(config) if block_given?
32
+ config
33
+ end
34
+
35
+ private
36
+
37
+ def set_pulumi_env_vars
38
+ ENV['PULUMI_HOME'] = @pulumi_home
39
+ ENV['PULUMI_CONFIG_PASSPHRASE'] = ''
40
+ ENV['PULUMI_SKIP_UPDATE_CHECK'] = 'true'
41
+ end
42
+ end
43
+ end
44
+ end