Sha256: 988ff5d195ff6d481a3a8ed18d3fcb11067d41c086bb9303ec52e42668523668

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

require File.expand_path("../container_connector/version", __FILE__)
require File.expand_path("../container_connector/errors",  __FILE__)

module Evrone
  module CI
    module ContainerConnector

      autoload :Local,  File.expand_path("../container_connector/local",  __FILE__)
      autoload :Docker, File.expand_path("../container_connector/docker", __FILE__)

      extend self

      def lookup(name, options = {})
        case name.to_sym
        when :docker
          Docker.new options
        when :local
          Local.new options
        else
          raise NotFoundConnector.new("No available connector for #{name.inspect} found")
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evrone-ci-container_connector-0.2.0.pre28 lib/evrone/ci/container_connector.rb