Skip to content

Conversation

@sj26
Copy link

@sj26 sj26 commented Nov 20, 2024

Hey there! I always loved the idea of this gem. I love how simple it is. But I've never had reason to use it -- until recently.

I dug in a little and noticed the test suite wasn't really running, so I did a little update to get that working and add net-http as an explicit dependency as required by modern ruby. And, sadly, Rubinius is long gone. I also had to remove the basic auth tests because that doesn't seem to be enforced at the test endpoint any more.

Then I noticed that the gem does an initial request to get the content-length - but this isn't required. You can ask for the last 4096 bytes of a remote resource by specifying Range: bytes=-4096 which Net::HTTP supports as #set_range(-4096) and which simplifies the implementation.

Not sure if you're interested in contributions, but I offer it at your leisure 🙏

sj26 added 2 commits November 19, 2024 22:54
We can ask for the last 4096 bytes of the zip file without it.
@sj26 sj26 force-pushed the skip-head-request branch from 6d16cdf to d6db574 Compare November 20, 2024 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant