Sha256: e52cdbf5f0cf4ff7a36292ecaa05dff70e1f360ecc62b4439ca8d527c70965b9

Contents?: true

Size: 551 Bytes

Versions: 270

Compression:

Stored size: 551 Bytes

Contents

module Capistrano
  module Deploy
    module SCM
      def self.new(scm, config={})
        scm_file = "alpha_omega/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

270 entries across 270 versions & 1 rubygems

Version Path
alpha_omega-1.5.15 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.14 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.12 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.10 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.9 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.8 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.7 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.6 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.2.1 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.4 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.3 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.2 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.1 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.5.0 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.48 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.47 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.46 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.45 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.44 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.43 lib/alpha_omega/deploy/scm.rb