Sha256: af42f688b45ffe9e43f5f5ecde3cdaf7358f56c47c97d2b75c2f90dcc72c583e

Contents?: true

Size: 798 Bytes

Versions: 7

Compression:

Stored size: 798 Bytes

Contents

class Jets::Cfn::Builders
  class ApiDeploymentBuilder
    include Interface
    include Jets::AwsServices

    def initialize(options={})
      @options = options
      @template = ActiveSupport::HashWithIndifferentAccess.new(Resources: {})
    end

    # compose is an interface method
    def compose
      return if @options[:stack_type] == :minimal

      deployment = Jets::Resource::ApiGateway::Deployment.new
      add_resource(deployment)
      add_parameters(deployment.parameters)
      add_outputs(deployment.outputs)
    end

    # template_path is an interface method
    def template_path
      Jets::Naming.api_deployment_template_path
    end

    # do not bother writing a template if routes are empty
    def write
      super unless Jets::Router.routes.empty?
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jets-0.8.18 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.17 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.15 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.14 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.13 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.12 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.11 lib/jets/cfn/builders/api_deployment_builder.rb