aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-18 15:14:42 -0500
committerJack Nagel2014-07-18 15:15:12 -0500
commit99073dad6f57e2684ec5492e6c0a86ec1db5dffe (patch)
treeeeacc31d1d07a5b503d2d4f10fc84e90d732a69a /Library/Homebrew/software_spec.rb
parent4a95f48e41cfde4007113d486c90367c1351d4a5 (diff)
downloadhomebrew-99073dad6f57e2684ec5492e6c0a86ec1db5dffe.tar.bz2
Ask the filename object for the prefix
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 5382103d4..9a9db69fc 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -124,9 +124,18 @@ class Bottle
end
def to_s
- "#{name}-#{version}.#{tag}#{bottle_suffix(revision)}"
+ prefix + suffix
end
alias_method :to_str, :to_s
+
+ def prefix
+ "#{name}-#{version}.#{tag}"
+ end
+
+ def suffix
+ s = revision > 0 ? ".#{revision}" : ""
+ ".bottle#{s}.tar.gz"
+ end
end
extend Forwardable