Module: Dply::Strategy

Defined in:
lib/dply/strategy.rb,
lib/dply/strategy/git.rb,
lib/dply/strategy/base.rb,
lib/dply/strategy/archive.rb

Defined Under Namespace

Classes: Archive, Base, Git, NotImplementedError

Class Method Summary collapse

Class Method Details

.load(config, options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/dply/strategy.rb', line 4

def self.load(config, options)
  require_relative "strategy/#{config.strategy}"
  const = "::Dply::Strategy::#{config.strategy.capitalize}"
  const = Module.const_get(const)

  # persist roles if DPLY_PERSIST_ROLES env is present
  # load roles from roles file
  roles = get_roles
  persist_roles(roles)

  return const.new(config, options)
end