Sha256: 2e4a6d4c719fac28f8c54f015fb722e1382e7b095b88ed78fd7bab1c401460ee

Contents?: true

Size: 912 Bytes

Versions: 14

Compression:

Stored size: 912 Bytes

Contents

module Jack
  module EbConfig
    class Create < Base
      attr_reader :eb_config_path
      def initialize(options={})
        super
        @app_name = options[:app] || app_name_convention(@env_name)
      end

      def platform
        # TODO: change so that the gem default settins has nil for platform
        # but need to provide a deprecation warning first.
        # Right now it will never hit the lastest_docker_platform logic
        settings.create['platform'] || latest_docker_platform
      end

      def app_name
        @app_name
      end

      def latest_docker_platform
        solution_stacks.grep(/Docker/).
                        reject {|x| x =~ /Preconfigured/}.
                        reject {|x| x =~ /Multi-container/}.
                        sort.last
      end

      def solution_stacks
        eb.list_available_solution_stacks.solution_stacks
      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jack-eb-1.4.4 lib/jack/eb_config/create.rb
jack-eb-1.4.3 lib/jack/eb_config/create.rb
jack-eb-1.4.2 lib/jack/eb_config/create.rb
jack-eb-1.4.1 lib/jack/eb_config/create.rb
jack-eb-1.4.0 lib/jack/eb_config/create.rb
jack-eb-1.3.0 lib/jack/eb_config/create.rb
jack-eb-1.2.1 lib/jack/eb_config/create.rb
jack-eb-1.2.0 lib/jack/eb_config/create.rb
jack-eb-1.1.2 lib/jack/eb_config/create.rb
jack-eb-1.1.1 lib/jack/eb_config/create.rb
jack-eb-1.1.0 lib/jack/eb_config/create.rb
jack-eb-1.0.1 lib/jack/eb_config/create.rb
jack-eb-1.0.0 lib/jack/eb_config/create.rb
jack-eb-0.3.0 lib/jack/eb_config/create.rb