lib/arli/actions/git_repo.rb in arli-0.9.0 vs lib/arli/actions/git_repo.rb in arli-1.0.0

- old
+ new

@@ -1,9 +1,14 @@ require_relative 'action' +require_relative '../helpers/system_commands' + module Arli module Actions class GitRepo < Action + + include ::Arli::Helpers::SystemCommands + description 'Fetches or updates remote git repositories' check_command 'git --version' check_pattern 'git version' def execute @@ -17,23 +22,8 @@ def git_clone_command "git clone -v #{library.url} #{library.dir} 2>&1" end - protected - - # @param <String> *args — list of arguments or a single string - def run_system_command(*args) - cmd = args.join(' ') - raise 'No command to run was given' unless cmd - info("\n" + cmd.green) if Arli.debug? - o, e, s = Open3.capture3(cmd) - info("\n" + o) if o if Arli.debug? - info("\n" + e.red) if e && Arli.debug? - rescue Exception => e - error "Error running [#{args.join(' ')}]\n" + - "Current folder is [#{Dir.pwd.yellow}]", e - raise e - end end end end