Sha256: 6d6fb7e2eb62e869ebe59c175fcb0282439155da192ecc847c3c82c2deb8380e

Contents?: true

Size: 499 Bytes

Versions: 2

Compression:

Stored size: 499 Bytes

Contents

module Integrity
  module SCM
    class SCMUnknownError < StandardError; end

    def self.new(uri, *args)
      scm_class_for(uri).new(uri, *args)
    end

    def self.working_tree_path(uri)
      scm_class_for(uri).working_tree_path(uri)
    end

    private
    def self.scm_class_for(uri)
      [ Git, Subversion ].each do |klass|
        return klass if klass.is_this_my_home?( uri )
      end
      raise SCMUnknownError, "could not find any SCM based on URI '#{uri.to_s}'"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gforces-integrity-0.1.9.3 lib/integrity/scm.rb
gforces-integrity-0.1.9.4 lib/integrity/scm.rb