Change rake task to directory resource