diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index f2b5fffe4c99bcc1ab0de4970735b03122ed10ce..d9393a2a9e4a2101868ad470ef1c91050249b035 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -46,6 +46,17 @@ def bottle_filename_formula_name filename
   basename.rpartition("-#{version}").first
 end
 
+class Bintray
+  def self.repository(tap=nil)
+    return "bottles" if tap.to_s.empty?
+    "bottles-#{tap.sub(/^homebrew\/homebrew-/i, "")}"
+  end
+
+  def self.version(path)
+    BottleVersion.parse(path).to_s
+  end
+end
+
 class BottleCollector
   def initialize
     @checksums = {}