Class: Bauble::Resources::GemLayer
- Defined in:
- lib/bauble/resources/gem_layer.rb
Overview
a ruby lambda function
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Bauble::Resources::Resource
Instance Method Details
#bundle ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/bauble/resources/gem_layer.rb', line 11 def bundle FileUtils.mkdir_p("#{@app.config.gem_layer_asset_dir}/#{@app.gem_layer_hash}") Bauble::Cli::CodeBundler.docker_bundle_gems( gem_path: ".bauble/assets/gem_layer/#{@app.gem_layer_hash}" ) end |
#synthesize ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bauble/resources/gem_layer.rb', line 19 def synthesize { 'gemLayer' => { 'type' => 'aws:lambda:LayerVersion', 'name' => resource_name('gem_layer'), 'properties' => { 'code' => { 'fn::fileArchive' => "#{@app.config.gem_layer_asset_dir}/#{@app.gem_layer_hash}" }, 'layerName' => resource_name('gem_layer'), 'compatibleRuntimes' => %w[ruby3.2] } } } end |