Class: Kiel::SCM::Git

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

Instance Method Summary collapse

Instance Method Details

#version(file) ⇒ Object



13
14
15
16
17
18
# File 'lib/kiel/scm/git.rb', line 13

def version file
    files = [ file == '*' ? '' : file ].flatten
    return single_version( files.first ) if files.size == 1 

    files.sort.inject( '' ) { | sum, file | Digest::SHA1.hexdigest sum + single_version(file) }                
end