Sha256: fa8a47d724150c8e3a112d1834212fe33fc6802cee5d540f3504a72d7b7963db

Contents?: true

Size: 654 Bytes

Versions: 15

Compression:

Stored size: 654 Bytes

Contents

class Jets::Cfn::Builder
  class Controller < Nested
    # interface method
    def compose
      add_common_parameters
      add_api_gateway_parameters
      add_functions
      add_resources
      add_outputs
    end

    def add_outputs
      outputs = {}
      @template[:Resources].each do |logical_id, resource|
        next unless resource[:Type] == "AWS::Lambda::Function"
        outputs.merge!(logical_id => {
          Value: "!GetAtt #{logical_id}.Arn"
        })
      end
      @template[:Outputs] = outputs
    end

    def add_api_gateway_parameters
      return if Jets::Router.no_routes?
      add_parameter(:RestApi)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/cfn/builder/controller.rb
jets-5.0.12 lib/jets/cfn/builder/controller.rb
jets-5.0.11 lib/jets/cfn/builder/controller.rb
jets-5.0.10 lib/jets/cfn/builder/controller.rb
jets-5.0.9 lib/jets/cfn/builder/controller.rb
jets-5.0.8 lib/jets/cfn/builder/controller.rb
jets-5.0.7 lib/jets/cfn/builder/controller.rb
jets-5.0.6 lib/jets/cfn/builder/controller.rb
jets-5.0.5 lib/jets/cfn/builder/controller.rb
jets-5.0.4 lib/jets/cfn/builder/controller.rb
jets-5.0.3 lib/jets/cfn/builder/controller.rb
jets-5.0.2 lib/jets/cfn/builder/controller.rb
jets-5.0.1 lib/jets/cfn/builder/controller.rb
jets-5.0.0 lib/jets/cfn/builder/controller.rb
jets-5.0.0.beta1 lib/jets/cfn/builder/controller.rb