def scrape(repo, incremental=true, &callback)
      old_logger_callback = @logger.callback
      @logger.callback = callback
      errorlen = errors.size
      begin
        if retrieved = retrieve(repo)
          scan(retrieved)
        end
      rescue Exception
        # legacy logger handles communication with the end user and appending
        # to our error list; we just need to keep going. the new methodology
        # has no such guaranteed communication so the caller will decide how to
        # handle errors, etc.
      ensure
        @logger.callback = old_logger_callback
        cleanup
      end
      errors.size == errorlen
    end
def scrape(repo, incremental=true, &callback)
      old_logger_callback = @logger.callback
      @logger.callback = callback
      errorlen = errors.size
      begin
        if retrieved = retrieve(repo)
          scan(retrieved)
        end
      rescue Exception
        # legacy logger handles communication with the end user and appending
        # to our error list; we just need to keep going. the new methodology
        # has no such guaranteed communication so the caller will decide how to
        # handle errors, etc.
      ensure
        @logger.callback = old_logger_callback
        cleanup
      end
      errors.size == errorlen
    end
Initialize scrape destination directory

 === Options
 <tt>:kind</tt>:: Type of scraper that will traverse directory for resources, one of :cookbook or :workflow
 <tt>:basedir</tt>:: Local directory where files are retrieved and scraped, use temporary directory if nil
 <tt>:max_bytes</tt>:: Maximum number of bytes to read from remote repo, unlimited if nil
 <tt>:max_seconds</tt>:: Maximum number of seconds to spend reading from remote repo, unlimited if nil
 Scrapes and scans a given repository.

 @deprecated the newer methodology will perform these operations in stages
 controlled externally instead of calling this all-in-one method.

 === Parameters
 repo(Hash|RightScraper::Repositories::Base):: Repository to be scraped
   Note: repo can either be a Hash or a RightScraper::Repositories::Base instance.
         See the RightScraper::Repositories::Base class for valid Hash keys.

 === Block
 If a block is given, it will be called back with progress information
 the block should take four arguments:
 - first argument is one of <tt>:begin</tt>, <tt>:commit</tt>,
   <tt>:abort</tt> which signifies what
   the scraper is trying to do and where it is when it does it
 - second argument is a symbol describing the operation being performed
   in an easy-to-match way
 - third argument is optional further explanation
 - fourth argument is the exception pending (only relevant for <tt>:abort</tt>)

 === Return
 true:: If scrape was successful
 false:: If scrape failed, call errors for information on failure

 === Raise
 'Invalid repository type':: If repository type is not known