Sha256: db742076ca3f04261513155cbab6961d1589df51f86bbc8f3ff5afbfa0a295f5

Contents?: true

Size: 645 Bytes

Versions: 10

Compression:

Stored size: 645 Bytes

Contents

require 'picsolve_docker_builder/composer/requirements/context'
require 'picsolve_docker_builder/composer/requirements/postgres'
module PicsolveDockerBuilder
  module Composer
    # Requirements are enviromental dependencies for containers
    module Requirements
      def self.new(name, config, context)
        fail 'Requirement need to have parameter type' \
          unless config.key? 'type'
        object(config['type']).new(name, config, context)
      end

      def self.object(type)
        if type == 'postgres'
          Postgres
        else
          fail "Unknown requirement '#{type}'"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
picsolve_docker_builder-0.5.5 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.5.4 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.5.3 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.5.2 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.5.1 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.5.0 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.4.0 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.3.2 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.3.1 lib/picsolve_docker_builder/composer/requirements.rb
picsolve_docker_builder-0.3.0 lib/picsolve_docker_builder/composer/requirements.rb