aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/pathname.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-03-07 21:30:03 -0500
committerMike McQuaid2012-03-10 18:10:40 +1300
commit552dcdc7035d7114d47751d93630e37ae6d5bf24 (patch)
tree3ba45e367fc79d77fee16b9919a44ca56f712d6f /Library/Homebrew/extend/pathname.rb
parent4a306f32f468a0dfb1cd0faad861b3773babfa33 (diff)
downloadbrew-552dcdc7035d7114d47751d93630e37ae6d5bf24.tar.bz2
Move most bottle stuff to a bottles.rb file.
Diffstat (limited to 'Library/Homebrew/extend/pathname.rb')
-rw-r--r--Library/Homebrew/extend/pathname.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index f05fc9f5f..34f692f28 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -1,4 +1,5 @@
require 'pathname'
+require 'bottles'
# we enhance pathname to make our code more readable
class Pathname
@@ -100,9 +101,9 @@ class Pathname
# extended to support common double extensions
def extname
- return $1 if to_s =~ /(\.[a-z]+\.bottle\.tar\.gz)$/
+ return $1 if to_s =~ bottle_regex
# old brew bottle style
- return $1 if to_s =~ /(-bottle\.tar\.gz)$/
+ return $1 if to_s =~ old_bottle_regex
/(\.(tar|cpio)\.(gz|bz2|xz|Z))$/.match to_s
return $1 if $1
return File.extname(to_s)