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.3.4 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.3 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.2 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.3.1 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.2.0 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.11 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.10 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.9 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.7 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.6 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.5 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.4 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.3 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.1.1 lib/alpha_omega/deploy/scm.rb
alpha_omega-1.0.1 lib/alpha_omega/deploy/scm.rb
alpha_omega-0.0.226 lib/alpha_omega/deploy/scm.rb
alpha_omega-0.0.225 lib/alpha_omega/deploy/scm.rb
alpha_omega-0.0.224 lib/alpha_omega/deploy/scm.rb
alpha_omega-0.0.223 lib/alpha_omega/deploy/scm.rb
alpha_omega-0.0.222 lib/alpha_omega/deploy/scm.rb