Add TapDependency
This commit is contained in:
parent
369f9b3251
commit
c6bc01ab58
@ -131,3 +131,15 @@ class Dependency
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TapDependency < Dependency
|
||||||
|
def initialize(name, tags=[], env_proc=DEFAULT_ENV_PROC, option_name=name)
|
||||||
|
super(name, tags, env_proc, name.split("/").last)
|
||||||
|
end
|
||||||
|
|
||||||
|
def installed?
|
||||||
|
super
|
||||||
|
rescue FormulaUnavailableError
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@ -89,6 +89,8 @@ class DependencyCollector
|
|||||||
Dependency.new(spec, tags)
|
Dependency.new(spec, tags)
|
||||||
elsif (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
|
elsif (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
|
||||||
LanguageModuleDependency.new(tag, spec)
|
LanguageModuleDependency.new(tag, spec)
|
||||||
|
elsif HOMEBREW_TAP_FORMULA_REGEX === spec
|
||||||
|
TapDependency.new(spec, tags)
|
||||||
else
|
else
|
||||||
Dependency.new(spec, tags)
|
Dependency.new(spec, tags)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -27,6 +27,8 @@ HOMEBREW_WWW = 'http://example.com'
|
|||||||
HOMEBREW_CURL_ARGS = '-fsLA'
|
HOMEBREW_CURL_ARGS = '-fsLA'
|
||||||
HOMEBREW_VERSION = '0.9-test'
|
HOMEBREW_VERSION = '0.9-test'
|
||||||
|
|
||||||
|
HOMEBREW_TAP_FORMULA_REGEX = %r{^(\w+)/(\w+)/([^/]+)$}
|
||||||
|
|
||||||
RUBY_BIN = Pathname.new(RbConfig::CONFIG['bindir'])
|
RUBY_BIN = Pathname.new(RbConfig::CONFIG['bindir'])
|
||||||
RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']
|
RUBY_PATH = RUBY_BIN + RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user