class Makit::Rake


This class provide methods for working with the system Environment.

def self.rake_repository(url, task_name)

def self.rake_repository(url, task_name)
  local_path = File.join(Makit::Directories::HOME, "code", "work", Makit::Directories.get_relative_directory(url))
  if (Dir.exist?(local_path))
    Dir.chdir(local_path) do
      puts "  " + "#{local_path}".colorize(:grey)
      "git pull".run
    end
  else
    puts "> ".colorize(:grey) + "git clone #{url} #{local_path}".colorize(:green)
    `git clone #{url} #{local_path}`
  end
  Dir.chdir(local_path) do
    puts "  " + "#{local_path}".colorize(:grey)
    "rake #{task_name}".run
  end
end