aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/pathname.rb
AgeCommit message (Collapse)Author
2012-11-11Teach Pathname how to scan for metafilesAdam Vandenberg
2012-10-29Add support for 7zip archivesSijawusz Pur Rahnama
Closes Homebrew/homebrew#15723. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-27Pathname: add exec and jar helpersAdam Vandenberg
Closes Homebrew/homebrew#13318.
2012-10-20brew ln --force is now brew ln --overwriteMisty De Meo
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349 * Changes --dry-run to preview linking by default, rather than overwriting. An overwrite dry-run can be simulated via both --dry-run --overwrite * Adds some basic Keg tests
2012-10-04Don't count mkpath in ObserverPathnameExtensionMisty De Meo
mkpathed directories aren't really "linked" or "unlinked" per se, and link/unlink handle directories differently. It's easier just to ignore them, which finally synchronizes link/unlink counts.
2012-09-27Improve text_executable heuristicJack Nagel
Previously we detected this by reading the first line of the file. However, "first line" is meaningless when dealing with binary files, but IO#readline will happily keep reading until it finds a newline character, which can result in some unnecessarily large buffers. Aside from the performance issue, this causes an additional problem under Ruby 1.9: trying to match the binary string against a pattern will raise ArgumentError (unless the binary string just happens to also be valid UTF-8, heh). Fix both issues: only read the first 1024 bytes, as no sane shebang will ever be that long, and use a plain read(), which returns an ASCII encoded string even on 1.9. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-29Produce good error messages for bad tarballsMax Howell
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-18Move version detection to Version classJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-13Don't fail if ENOENTMax Howell
2012-08-06Fix issues with writable? detection in brew doctorBrandon Black
Closes Homebrew/homebrew#13689. Signed-off-by: Max Howell <mxcl@me.com> There are subtle distinctions between writable? and writable_real? we don't understand precisely why we need this, but it fixes the bugs :/
2012-07-29Synchronize Keg#link and #unlink countsMisty De Meo
Keg#link would sometimes count a linked file when doing mkpath, even if the target directory already exists; #unlink would never count it. This meant that "brew ln" and "brew unlink" counts for the same keg could be out of sync with each other.
2012-07-09link: add --force and --dry-run optionsMisty De Meo
`brew link` can now be made to delete any conflicting files using the --force argument. It also has a --dry-run option, similar to git clean -n, which will list any files which would be deleted without touching the filesystem. Closes Homebrew/homebrew#11811. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-05Decouple pathname from bottlesJack Nagel
Pathname is one of the basic building block classes in Homebrew, and as such it is preferrable that `require`ing it does not drag in other Homebrew code; thus avoiding circular dependency situations. Its dependency on bottles.rb gave it an implicit dependency on formula.rb, among other things. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Refactor checksummingJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-15Improve Pathname#text_executable? regexpJack Nagel
file(1) does not allow leading whitespace on shebang lines, and there appears to be no restrictions on what characters follow '#!', either. While at it, fix an erroneous shebang test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-03Handle EOF in Pathname#text_executable?Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30Pathname: add Mach-O moduleJack Nagel
The MachO module contains methods for learning about Mach-O binaries, and can be used where one might normally shell out to file(1). Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-03Don't unzip war filesAdam Vandenberg
2012-05-03Detect uncompressed tarsAdam Vandenberg
From a patch by @RuiPereira Closes Homebrew/homebrew#12011.
2012-05-02Extract detection of compression typesAdam Vandenberg
Separate out detecting compression types from uncompressing and staging.
2012-05-01Fix Ruby warnings.Mike McQuaid
Fixes Homebrew/homebrew#11966.
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed Homebrew/homebrew#11562.
2012-04-24Add and correctly find erlang bottle.Mike McQuaid
Fixes Homebrew/homebrew#11780.
2012-04-24Revert "Add and correctly find erlang bottle."Mike McQuaid
This reverts commit 146e253856eb3e27b6b7382734fd178c160c1beb.
2012-04-24Revert "Change versioned bottle syntax and fix issues."Mike McQuaid
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.
2012-04-24Add and correctly find erlang bottle.Mike McQuaid
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed Homebrew/homebrew#11562.
2012-04-09make_relative_symlink: give more specific adviceMisty De Meo
2012-03-30Show target path when emptyAdam Vandenberg
2012-03-30install: warn when passed no filesAdam Vandenberg
Rationale: we warn when inreplace makes no changes; this is a similar sort of warning. We expected some list (probably via Dir) to include some files, but none were found. Either the list was wrong, or the install can now be omitted.
2012-03-22Don't double print ln message in verbose modeMax Howell
Refs Homebrew/homebrew#11091.
2012-03-19Better error when linking failsMax Howell
Refs http://stackoverflow.com/questions/9762943 The system ln no longer outputs anything. Though the user can force its output with a --verbose of course. So in cases where it's not the usual of: not writable or existing file, we can ask the user to run with --verbose. I don't particularly like hiding its output, but it just confused the error IMO since it is creating a relative symlink the output was weird every time I've seen it in tickets. I made a print wrapper so that the brew-link output doesn't get mucked up if an exception is thrown.
2012-03-16Tap more than one formula from taps other than altMax Howell
Whoops.
2012-03-16Taps can only have one directory of formulaMax Howell
Rationale: Let's not have duplicate-names. Insisting on only one directory lets the filesystem enforce this unique-naming criteria for us. We special-case adamv/alt for now, until we remove it.
2012-03-16Pathname.atomic_writeMax Howell
2012-03-16Leave kegs keg-only if linking step failsMax Howell
Rationale: well, it should always have been like this! However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
2012-03-16`brew tap` and `brew untap`Max Howell
2012-03-11Allow multiple digits in GitHub version partsAdam Vandenberg
2012-03-10Move most bottle stuff to a bottles.rb file.Mike McQuaid
2012-03-10Support bottles for non-Lion OSX versions.Mike McQuaid
2012-03-06Pathname.stem knows about bottlesMax Howell
2012-02-21Convert to Pathname if not Pathname as we need it to beMax Howell
2012-02-17Update return values of install and install_symlinkAdam Vandenberg
These now return an Array of all the target destinations. Previously, if a single argument was passed a single non- Array was returned. This behavior has been changed so that an Array is always returned even for a single argument. Updated the test. Hopefully this won't break any custom code out there.
2012-02-12Pathname.install_symlinkAdam Vandenberg
2012-02-11Recognize dist suffixAdam Vandenberg
2012-02-10Pathname: silence install-info outputJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-09Allow multiple arguments to installAdam Vandenberg
2012-02-08this was out of balanceAdam Vandenberg
2012-02-08Pathname: support .tar.Z extensionAdam Vandenberg