From 03490531d8d827addabb503722e4be41f8011741 Mon Sep 17 00:00:00 2001 From: Jeremy Cook Date: Mon, 24 Nov 2014 08:49:17 -0500 Subject: [PATCH] Changed name of git check method to be more descriptive. --- lib/homesick/actions/git_actions.rb | 2 +- lib/homesick/cli.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/homesick/actions/git_actions.rb b/lib/homesick/actions/git_actions.rb index 0e2a746..c7fb85b 100644 --- a/lib/homesick/actions/git_actions.rb +++ b/lib/homesick/actions/git_actions.rb @@ -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) ] diff --git a/lib/homesick/cli.rb b/lib/homesick/cli.rb index 2e2eeab..8754031 100644 --- a/lib/homesick/cli.rb +++ b/lib/homesick/cli.rb @@ -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