Sha256: f2959a131fe255cb522b34d0b1f0b74f39dae9f90a3fc31d66c04ce1d1beb128

Contents?: true

Size: 558 Bytes

Versions: 13

Compression:

Stored size: 558 Bytes

Contents

module Capistrano
  module Deploy
    module SCM
      def self.new(scm, config={})
        scm_file = "capistrano/recipes/deploy/scm/#{scm}"
        require(scm_file)

        scm_const = scm.to_s.capitalize.gsub(/_(.)/) { $1.upcase }
        if const_defined?(scm_const)
          const_get(scm_const).new(config)
        else
          raise Capistrano::Error, "could not find `#{name}::#{scm_const}' in `#{scm_file}'"
        end
      rescue LoadError
        raise Capistrano::Error, "could not find any SCM named `#{scm}'"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
capistrano-2.15.11 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.10 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.9 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.8 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.7 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.6 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.5 lib/capistrano/recipes/deploy/scm.rb
minmb-capistrano-2.15.4 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.4 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.3 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.2 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.0 lib/capistrano/recipes/deploy/scm.rb
capistrano-2.15.1 lib/capistrano/recipes/deploy/scm.rb