Sha256: c05cb617e1ba128b66a9ec260d00e322090590f8a0a60664ce1ee0b3a2c968d8
Contents?: true
Size: 667 Bytes
Versions: 6
Compression:
Stored size: 667 Bytes
Contents
module Capistrano module Deploy module Strategy def self.new(strategy, config={}) strategy_file = "capistrano/recipes/deploy/strategy/#{strategy}" strategy_const = strategy.to_s.capitalize.gsub(/_(.)/) { $1.upcase } require(strategy_file) unless const_defined?(strategy_const) if const_defined?(strategy_const) const_get(strategy_const).new(config) else raise Capistrano::Error, "could not find `#{name}::#{strategy_const}' in `#{strategy_file}'" end rescue LoadError raise Capistrano::Error, "could not find any strategy named `#{strategy}'" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems