aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 060568664..9ace95e21 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -47,6 +47,7 @@ class SoftwareSpec
def owner= owner
@name = owner.name
@full_name = owner.full_name
+ @bottle_specification.tap = owner.tap
@owner = owner
@resource.owner = self
resources.each_value do |r|
@@ -259,19 +260,26 @@ class BottleSpecification
DEFAULT_PREFIX = "/usr/local".freeze
DEFAULT_CELLAR = "/usr/local/Cellar".freeze
DEFAULT_DOMAIN = "https://homebrew.bintray.com".freeze
- DEFAULT_ROOT_URL = "#{DEFAULT_DOMAIN}/bottles".freeze
- attr_rw :root_url, :prefix, :cellar, :revision
+ attr_rw :prefix, :cellar, :revision
+ attr_accessor :tap
attr_reader :checksum, :collector
def initialize
@revision = 0
@prefix = DEFAULT_PREFIX
@cellar = DEFAULT_CELLAR
- @root_url = DEFAULT_ROOT_URL
@collector = BottleCollector.new
end
+ def root_url(var=nil)
+ if var.nil?
+ @root_url ||= "#{DEFAULT_DOMAIN}/#{Bintray.repository(tap)}"
+ else
+ @root_url = var
+ end
+ end
+
def compatible_cellar?
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
end