Sha256: 5abfb005c1408799427f95c6814059e450da80f72f29fc8ebb55fb6f056b509c

Contents?: true

Size: 712 Bytes

Versions: 5

Compression:

Stored size: 712 Bytes

Contents

module DPL
  class Provider
    module Heroku
      autoload :API,          'dpl/provider/heroku/api'
      autoload :Generic,      'dpl/provider/heroku/generic'
      autoload :Git,          'dpl/provider/heroku/git'
      autoload :GitSSH,       'dpl/provider/heroku/git_ssh'
      autoload :GitDeployKey, 'dpl/provider/heroku/git_deploy_key'

      extend self

      def new(context, options)
        strategy = options[:strategy] || 'api'
        constant = constants.detect { |c| c.to_s.downcase == strategy.downcase.gsub(/\W/, '') }
        raise Error, 'unknown strategy %p' % strategy unless constant and constant != Generic
        const_get(constant).new(context, options)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dpl-1.8.38.travis.2151.5 lib/dpl/provider/heroku.rb
dpl-1.8.38.travis.2140.5 lib/dpl/provider/heroku.rb
dpl-1.8.37 lib/dpl/provider/heroku.rb
dpl-1.8.38.travis.2138.5 lib/dpl/provider/heroku.rb
dpl-1.8.37.travis.2137.5 lib/dpl/provider/heroku.rb