Sha256: 531b0914ea25be7118c1a7fe471c318f52efda8d912de040edc3a17f3b2c2990

Contents?: true

Size: 493 Bytes

Versions: 12

Compression:

Stored size: 493 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(string)
        case string.to_s
          when /\.git\/?/ then Git
          else raise SCMUnknownError, "could not find any SCM based on string '#{string}'"
        end
      end
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
bantic-integrity-0.1.4.1 lib/integrity/scm.rb
bantic-integrity-0.1.4.2 lib/integrity/scm.rb
bantic-integrity-0.1.4.3 lib/integrity/scm.rb
bantic-integrity-0.1.4.4 lib/integrity/scm.rb
bantic-integrity-0.1.4 lib/integrity/scm.rb
defunkt-integrity-0.1.1 lib/integrity/scm.rb
foca-integrity-0.1.0 lib/integrity/scm.rb
foca-integrity-0.1.1 lib/integrity/scm.rb
foca-integrity-0.1.2 lib/integrity/scm.rb
foca-integrity-0.1.3 lib/integrity/scm.rb
foca-integrity-0.1.4 lib/integrity/scm.rb
giraffesoft-integrity-0.1.4 lib/integrity/scm.rb