class Cucumber::Pro::Scm::WorkingCopy
Constants
- NoGitRepoFound
Public Class Methods
detect(path = Dir.pwd)
click to toggle source
# File lib/cucumber/pro/scm/working_copy.rb, line 12 def self.detect(path = Dir.pwd) if Dir.entries(path).include? '.git' GitWorkingCopy.new(path) else # TODO (aslak): This is likely to loop indefinitely on Windows - it's never '/' # Maybe use Pathname? raise NoGitRepoFound if path == '/' detect File.expand_path(path + '/..') end end