From: Kev Jackson Date: 2005-11-02T15:04:56+09:00 Subject: Re: [ANN] urirequire: I got yer Web 2.0 right here Daniel Sheppard wrote: >> if expected_digest >> raise "Wrong Hash - Expected '#{expected_digest}', recieved >> >> >'#{digest}'" > >what sort of drugs am I on? Seemingly not the good ones. > >if expected_digest > raise "Wrong Hash - Expected '#{expected_digest}', received >'#{digest}'" unless digest == expected_digest > > >I actually think this has the potential of being a damn useful library. >Once you put in the hashing, I don't see why this is any more dangerous >than a gem. The only problem is that you'd need to modify your code to >upgrade to a newer version of a library, but there's not too much wrong >with that. If you're hashing the code, it's not allowed to be modified, >so you can keep a local cache of files and only download once. > >Or, if you're just doing it with somewhere you can trust, you can just >use it within your own scripts and let them download the latest version >from a constantly-changing source. > > If you could adapt it so that it'll accept svn:// (or https I suppose), then you could even use it to keep libraries updated from a svn repo - which would be rather nice