From cc607d9c068391db94ff0ea9bda8ef562df543c2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 19 Feb 2015 10:56:01 +0000 Subject: bottles: add Bintray class. For some utility functions. --- Library/Homebrew/bottles.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index f2b5fffe4..d9393a2a9 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 = {} -- cgit v1.2.3