diff options
| author | Tim D. Smith | 2015-04-02 21:43:28 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2015-04-06 20:26:52 -0700 |
| commit | 9e64032997a6c427e8b1d46c534a9aa07a07c268 (patch) | |
| tree | 622a1ec428deb170410d087ea07561280f866709 | |
| parent | e6589126b17477cf18b100657d1b4e76ec5c0073 (diff) | |
| download | homebrew-9e64032997a6c427e8b1d46c534a9aa07a07c268.tar.bz2 | |
add SoftwareSpec#go_resource
by analogy to similar code in formula.rb.
Permits #37877. Closes #38330.
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 39e065a7a..88c5c5449 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -914,7 +914,7 @@ class Formula end def go_resource name, &block - resource name, Resource::Go, &block + specs.each { |spec| spec.go_resource(name, &block) } end def depends_on dep diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index f5e81d65e..463129498 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -85,6 +85,10 @@ class SoftwareSpec end end + def go_resource name, &block + resource name, Resource::Go, &block + end + def option_defined?(name) options.include?(name) end |
