homebrew-cask
https://github.com/phinze/homebrew-cask
Ruby
🍻 A CLI workflow for the administration of macOS applications distributed as binaries
Hbc::SubversionDownloadStrategy#compress
TODO/UPDATE: the tar approach explained below is fragile against challenges such as case-sensitive filesystems, and must be re-implemented. Seems nutty: we "download" the contents into a tape archive. Why? * A single file is tractable to the rest of the Cask toolchain, * An alternative would be to create a Directory container type. However, some type of file-serialization trick would still be needed in order to enable calculating a single checksum over a directory. So, in that alternative implementation, the special cases would propagate outside this class, including the use of tar or equivalent. * SubversionDownloadStrategy.cached_location is not versioned * tarball_path provides a needed return value for our overridden fetch method. * We can also take this private opportunity to strip files from the download which are protocol-specific.
Edit
git clone [email protected]:phinze/homebrew-cask.git
cd homebrew-cask
open lib/hbc/download_strategy.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Hbc--SubversionDownloadStrategy-compress-for-pr
# Commit to gitgit add lib/hbc/download_strategy.rbgit commit -m "better docs for Hbc::SubversionDownloadStrategy#compress"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Hbc--SubversionDownloadStrategy-compress-for-pr
hub pull-request
# Celebrate!