Package selection and downloading functional

This commit is contained in:
2026-09-14 14:21:40 -05:00
parent db0dd9fc7c
commit 4ba71b760a
6 changed files with 218 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ module W3DHubLauncher
@name = hash["name"]
@error = hash["error"]
@file_size = Integer(hash["size"] || 0)
@checksum_chunk_size = Integer(hash["checksum-size"] || 0)
@checksum_chunk_size = Integer(hash["checksum-chunk-size"] || 0)
@sha256_checksum = hash["checksum"]
@checksum_chunks = hash["checksum-chunks"]
@download_url = hash["download_url"]
@@ -25,6 +25,10 @@ module W3DHubLauncher
@error
end
def version?
@version != Gem::Version.new("0.0.0.0")
end
# checksum whole file and file chunks until a mismatch occurs or the whole file is verified.
def verify_file(filename)
file_size = File.size(filename)