diff options
| author | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-09-21 19:27:24 -0500 | 
| commit | 0af7d5611e09d88dbcec602bd523d8a72a81c57b (patch) | |
| tree | cab0b66a9828c51cc9948690ff30b24382c765fa /Library/Homebrew/formula.rb | |
| parent | d2c4be9ebee74145ea7eb2f54273df1b5c29c1f0 (diff) | |
| download | homebrew-0af7d5611e09d88dbcec602bd523d8a72a81c57b.tar.bz2 | |
Move dependencies to SoftwareSpec
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 19 | 
1 files changed, 9 insertions, 10 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 4011a6210..35dc9a08d 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1,4 +1,3 @@ -require 'dependency_collector'  require 'formula_support'  require 'formula_lock'  require 'formula_pin' @@ -105,6 +104,14 @@ class Formula      active_spec.resources.values    end +  def deps +    active_spec.deps +  end + +  def requirements +    active_spec.requirements +  end +    # if the dir is there, but it's empty we consider it not installed    def installed?      (dir = installed_prefix).directory? && dir.children.length > 0 @@ -442,9 +449,6 @@ class Formula      Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Formula/#{name.downcase}.rb")    end -  def deps;         self.class.dependencies.deps;         end -  def requirements; self.class.dependencies.requirements; end -    def env      @env ||= self.class.env    end @@ -719,13 +723,8 @@ class Formula        end      end -    def dependencies -      @dependencies ||= DependencyCollector.new -    end -      def depends_on dep -      d = dependencies.add(dep) -      build.add_dep_option(d) unless d.nil? +      specs.each { |spec| spec.depends_on(dep) }      end      def option name, description=nil  | 
