Changed name of git check method to be more descriptive.

This commit is contained in:
Jeremy Cook
2014-11-24 08:49:17 -05:00
parent 7bd9759e81
commit 03490531d8
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ module Homesick
}
STRING = MIN_VERSION.values.join('.')
def version_check
def git_version_correct?
info = `git --version`.scan(/(\d+)\.(\d+)\.(\d+)/).flatten.map(&:to_i)
return false unless info.count == 3
current_version = Hash[ [:major, :minor, :patch].zip(info) ]

View File

@@ -20,7 +20,7 @@ module Homesick
def initialize(args = [], options = {}, config = {})
super
# Check if git is installed
unless version_check
unless git_version_correct?
say_status :error, "Git version >= #{Homesick::Actions::GitActions::STRING} must be installed to use Homesick", :red
exit(1)
end