diff options
| author | Jack Nagel | 2012-07-10 21:45:17 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-18 11:12:09 -0500 |
| commit | 2ff6c40735be2aca0e37ed94095526abcd115310 (patch) | |
| tree | 0e6bab0492ac2f44e94a8b1704e4991026395021 /Library/Homebrew/test/testball.rb | |
| parent | 741a4168d0c5455ecc1574ae1ebe08df1ebfddd8 (diff) | |
| download | brew-2ff6c40735be2aca0e37ed94095526abcd115310.tar.bz2 | |
Add support for custom version schemes
A version scheme is a class that inherits from Version and reimplements
Version#<=>. This will allow formulae to specify a custom comparison
method that will be used instead of the default, for cases where the
default is insufficient.
Diffstat (limited to 'Library/Homebrew/test/testball.rb')
| -rw-r--r-- | Library/Homebrew/test/testball.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb index c7118d3ee..8e4c745d3 100644 --- a/Library/Homebrew/test/testball.rb +++ b/Library/Homebrew/test/testball.rb @@ -271,3 +271,17 @@ class RevisedBottleSpecTestBall < Formula super "revisedbottlespectestball" end end + +class CustomVersionScheme < Version +end + +class CustomVersionSchemeTestBall < Formula + homepage 'http://example.com' + url 'file:///foo.com/testball-0.1.tbz' + sha1 '482e737739d946b7c8cbaf127d9ee9c148b999f5' + version '1.0' => CustomVersionScheme + + def initialize name=nil + super "customversionschemetestball" + end +end |
