Sha256: a52b3a8524926fa4df53f6dbb61270cec82ce2f448dbf9bd1276d0ee713a2fbe

Contents?: true

Size: 627 Bytes

Versions: 86

Compression:

Stored size: 627 Bytes

Contents

module Capistrano
  module Deploy
    module Strategy
      def self.new(strategy, config={})
        strategy_file = "capistrano/recipes/deploy/strategy/#{strategy}"
        require(strategy_file)

        strategy_const = strategy.to_s.capitalize.gsub(/_(.)/) { $1.upcase }
        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

86 entries across 86 versions & 10 rubygems

Version Path
wulffeld-capistrano-2.5.8.3 lib/capistrano/recipes/deploy/strategy.rb
capistrano-2.5.22 lib/capistrano/recipes/deploy/strategy.rb
dan-capistrano-2.5.6 lib/capistrano/recipes/deploy/strategy.rb
fotonauts-capistrano-2.5.2 lib/capistrano/recipes/deploy/strategy.rb
mbailey-capistrano-2.5.5 lib/capistrano/recipes/deploy/strategy.rb
mbailey-capistrano-2.5.6 lib/capistrano/recipes/deploy/strategy.rb
mbailey-capistrano-2.5.7 lib/capistrano/recipes/deploy/strategy.rb
sneakin-capistrano-2.5.5 lib/capistrano/recipes/deploy/strategy.rb
thoughtbot-capistrano-2.5.5 lib/capistrano/recipes/deploy/strategy.rb
thoughtbot-capistrano-2.5.6 lib/capistrano/recipes/deploy/strategy.rb
wulffeld-capistrano-2.5.8.1 lib/capistrano/recipes/deploy/strategy.rb
wulffeld-capistrano-2.5.8 lib/capistrano/recipes/deploy/strategy.rb
capistrano-2.14.2 lib/capistrano/recipes/deploy/strategy.rb
capistrano-2.14.1 lib/capistrano/recipes/deploy/strategy.rb
capistrano-2.13.5 lib/capistrano/recipes/deploy/strategy.rb
HeSYINUvSBZfxqA-capistrano-2.5.28 lib/capistrano/recipes/deploy/strategy.rb
HeSYINUvSBZfxqA-capistrano-2.5.27 lib/capistrano/recipes/deploy/strategy.rb
HeSYINUvSBZfxqA-capistrano-2.5.26 lib/capistrano/recipes/deploy/strategy.rb
HeSYINUvSBZfxqA-capistrano-2.5.25 lib/capistrano/recipes/deploy/strategy.rb
HeSYINUvSBZfxqA-capistrano-2.5.24 lib/capistrano/recipes/deploy/strategy.rb