def tarball
      tarfile = StringIO.new("")
      Gem::Package::TarWriter.new(tarfile) do |tar|
        path = "#{staging_dir}/#{packager.package_name}"
        name = packager.package_name
        mode = File.stat(path).mode

        tar.add_file(name, mode) do |tf|
          File.open(path, "rb") do |file|
            tf.write(file.read)
          end
        end
      end

      tarfile.rewind
      tarfile
    end
def tarball
      tarfile = StringIO.new("")
      Gem::Package::TarWriter.new(tarfile) do |tar|
        path = "#{staging_dir}/#{packager.package_name}"
        name = packager.package_name
        mode = File.stat(path).mode

        tar.add_file(name, mode) do |tf|
          File.open(path, "rb") do |file|
            tf.write(file.read)
          end
        end
      end

      tarfile.rewind
      tarfile
    end
Create an in-memory tarball from the given packager.

 @return [StringIO]