def update!
      local_repo = Pullr::LocalRepository.new(
        :path => self.path,
        :scm  => self.scm
      )

      # only update if we have a repository
      local_repo.update(self.uri)

      # re-initialize the metadata
      initialize_metadata

      # save the repository
      if save
        # syncs the cached files of the repository
        sync_scripts!
      end

      yield self if block_given?
      return self
    end
def update!
      local_repo = Pullr::LocalRepository.new(
        :path => self.path,
        :scm  => self.scm
      )

      # only update if we have a repository
      local_repo.update(self.uri)

      # re-initialize the metadata
      initialize_metadata

      # save the repository
      if save
        # syncs the cached files of the repository
        sync_scripts!
      end

      yield self if block_given?
      return self
    end
Updates the repository, reloads it's metadata and syncs the
 cached files of the repository.

 @yield [repo]
   If a block is given, it will be passed after the repository has
   been updated.

 @yieldparam [Repository] repo
   The updated repository.

 @return [Repository]
   The updated repository.

 @since 1.0.0

 @api private