Sha256: cc1d7a9e510c97eba687e6e1f82c3d87c7bc562376fac3cd654e94faa5eebb87

Contents?: true

Size: 826 Bytes

Versions: 27

Compression:

Stored size: 826 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 unless @options[:templates] || @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

27 entries across 27 versions & 1 rubygems

Version Path
jets-1.1.5 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.1.4 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.1.3 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.1.2 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.1.1 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.1.0 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.18 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.17 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.16 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.15 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.13 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.12 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.11 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.10 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.9 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.8 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.7 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.6 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.5 lib/jets/cfn/builders/api_deployment_builder.rb
jets-1.0.4 lib/jets/cfn/builders/api_deployment_builder.rb