aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-11-07 11:25:20 -0800
committerAdam Vandenberg2010-11-07 11:25:20 -0800
commitd6f02b5a2c990814a0517fc07694062ccfb6c7e6 (patch)
treeaa6effbb33d5b165afedd031eb46bbe5c598eed4 /Library
parent3fa21530b35f1b82b6d1fa7a66cbc2409d10c477 (diff)
downloadhomebrew-d6f02b5a2c990814a0517fc07694062ccfb6c7e6.tar.bz2
Allow underscore in github version numbers.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/ack.rb1
-rw-r--r--Library/Homebrew/extend/pathname.rb9
2 files changed, 7 insertions, 3 deletions
diff --git a/Library/Formula/ack.rb b/Library/Formula/ack.rb
index 4be7335b7..a9e9899f8 100644
--- a/Library/Formula/ack.rb
+++ b/Library/Formula/ack.rb
@@ -2,7 +2,6 @@ require 'formula'
class Ack < Formula
url "https://github.com/petdance/ack/tarball/1.93_02"
- version '1.93_02'
md5 'b468ce41a949fd957dc9b6aee74782e9'
homepage 'http://betterthangrep.com/'
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index f61a69e09..8b690a258 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -108,15 +108,20 @@ class Pathname
stem=self.stem
end
- # github tarballs are special
- # we only support numbered tagged downloads
+ # github tarballs, like v1.2.3
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
return $1 if $1
+ # dashed version
# eg. github.com/isaacs/npm/tarball/v0.2.5-1
%r[github.com/.*/tarball/v?((\d\.)+\d+-(\d+))$].match to_s
return $1 if $1
+ # underscore version
+ # eg. github.com/petdance/ack/tarball/1.93_02
+ %r[github.com/.*/tarball/v?((\d\.)+\d+_(\d+))$].match to_s
+ return $1 if $1
+
# eg. boost_1_39_0
/((\d+_)+\d+)$/.match stem
return $1.gsub('_', '.') if $1