diff options
| author | Mike McQuaid | 2015-02-19 10:56:01 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-19 11:06:20 +0000 |
| commit | e303a97aa710e781c9ccb0b5b7c7675f26862be3 (patch) | |
| tree | 57dade827abffd33b0f07820620dc5f9bc4acc3b /Library | |
| parent | 258c4ddefe60f65570aee2aef9243eb23a6ee5a9 (diff) | |
| download | brew-e303a97aa710e781c9ccb0b5b7c7675f26862be3.tar.bz2 | |
bottles: add Bintray class.
For some utility functions.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 = {} |
