Class: Tddium::SCM

Inherits:
Object
  • Object
show all
Defined in:
lib/tddium/scm/scm.rb

Class Method Summary collapse

Class Method Details

.configureObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/tddium/scm/scm.rb', line 5

def self.configure
  scm = nil
  [::Tddium::Git, ::Tddium::Hg].each do |scm_class|
    sniff_scm = scm_class.new
    if sniff_scm.repo? && scm_class.version_ok
      scm = sniff_scm
      break
    end
  end

  #default scm is git
  scm = ::Tddium::Git.new unless scm
  scm
end