chocolatey/chocolatey — pull request #596 by bennyhat (2014-10-25 19:55:08+00:00)
Title: Addition of local caching for flat web folders

Hello,
I have a situation in my office where I'm not able to actually host a NuGet repository, as my IT team won't allot me a Windows Server for it. I also can't host my packages outside our LAN. I do, however, have access to several internal Linux servers, and can host files fairly easy internally.

Long story short: I forked chocolatey and added some helper functions (probably should have been in extensions, which I realized too late) that allow me to use a simple, dumb, web directory as a source. These additions primarily allow for the following:

- addition of a web directory source as -type cache
- downloading of that source nupkg files via a new command called ```choco sources update```, which crawls the web directory and downloads the package files to a local path of $nugetPath\cache\
- fix-up of the source's directory when installing and uninstalling packages so that NuGet references the local cache and not the web directory

I finally got around to putting up a workable example in the readme for the fork, so feel free to give that a spin if you'd like.

Otherwise, here are some other things/caveats:
- I did not TDD/BDD this, nor did I wrap it in tests. I certainly can if you'd like.
- There are some other minor helper functions I added in there for less verbose directory creation and removal.
- I also added in a quick helper for get-webfile that allows for one to embed a username and password in a source URL, as that was another minor internal issue I needed to get around. Ex. http://user:password@example.com/repository

If you'd like me to restructure it or compact the commits, I can certainly do that.
Thanks,
Ben Brewer / bennyhat