Module: Capistrano::Deploy::SCM
- Defined in:
- lib/capistrano/recipes/deploy/scm.rb,
lib/capistrano/recipes/deploy/scm/bzr.rb,
lib/capistrano/recipes/deploy/scm/cvs.rb,
lib/capistrano/recipes/deploy/scm/git.rb,
lib/capistrano/recipes/deploy/scm/base.rb,
lib/capistrano/recipes/deploy/scm/none.rb,
lib/capistrano/recipes/deploy/scm/darcs.rb,
lib/capistrano/recipes/deploy/scm/accurev.rb,
lib/capistrano/recipes/deploy/scm/perforce.rb,
lib/capistrano/recipes/deploy/scm/mercurial.rb,
lib/capistrano/recipes/deploy/scm/subversion.rb
Defined Under Namespace
Classes: Accurev, Base, Bzr, Cvs, Darcs, Git, Mercurial, None, Perforce, Subversion
Class Method Summary collapse
Class Method Details
.new(scm, config = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/capistrano/recipes/deploy/scm.rb', line 4 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 |