aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/pathname.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2011-06-04 17:29:21 -0700
committerAdam Vandenberg2011-06-04 17:29:21 -0700
commitf7c7fae0edef442b198921a8a33c35ccc83e6f18 (patch)
tree9fa7a8bb78772270c03eb53100aadacd1cabfc54 /Library/Homebrew/extend/pathname.rb
parent04b90610a3b9f7bd1a6cbb308ecdde6fd0728339 (diff)
downloadbrew-f7c7fae0edef442b198921a8a33c35ccc83e6f18.tar.bz2
Also find versions in zipballs
Diffstat (limited to 'Library/Homebrew/extend/pathname.rb')
-rw-r--r--Library/Homebrew/extend/pathname.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 1436e2e8e..8398bb17d 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -114,18 +114,18 @@ class Pathname
end
# github tarballs, like v1.2.3
- %r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
- return $1 if $1
+ %r[github.com/.*/(zip|tar)ball/v?((\d\.)+\d+)$].match to_s
+ return $2 if $2
# 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
+ %r[github.com/.*/(zip|tar)ball/v?((\d\.)+\d+-(\d+))$].match to_s
+ return $2 if $2
# 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
+ %r[github.com/.*/(zip|tar)ball/v?((\d\.)+\d+_(\d+))$].match to_s
+ return $2 if $2
# eg. boost_1_39_0
/((\d+_)+\d+)$/.match stem