Sha256: 7971e5bbfdd1634757e589c1f106d01a2a0c6ec08d8170f574098bb8dc84641e

Contents?: true

Size: 853 Bytes

Versions: 9

Compression:

Stored size: 853 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

      puts "Building API Gateway Deployment template."
      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

9 entries across 9 versions & 1 rubygems

Version Path
jets-0.8.10 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.9 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.8 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.6 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.5 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.4 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.3 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.2 lib/jets/cfn/builders/api_deployment_builder.rb
jets-0.8.1 lib/jets/cfn/builders/api_deployment_builder.rb