Sha256: 076560c9fd46dfc5fd4a9b81ea56dec41db490fd2ad712aaf187132b3c12405a
Contents?: true
Size: 553 Bytes
Versions: 3
Compression:
Stored size: 553 Bytes
Contents
module PrePush class Validator def self.validate runner if !Dir.exists?('.git') puts "Couldn't find a git repository" return false end if !Dir.exists?('.git/hooks') puts "Couldn't find the git hooks dir" return false end bin = File.dirname(__FILE__) runners_dir = "#{bin}/../lib/runners" found = false Dir.entries(runners_dir).each {|file| found = true if file == runner} unless found puts "Couldn't find test runner #{runner}" return false end return true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pre_push-0.0.1.1 | lib/prepush_validator.rb |
pre_push-0.0.1.2 | lib/prepush_validator.rb |
pre_push-0.0.1 | lib/prepush_validator.rb |