Class: HomebrewAnalyzer

Inherits:
DepAnalyzer show all
Defined in:
lib/homebrew_analyzer.rb

Instance Attribute Summary

Attributes inherited from DepAnalyzer

#g

Instance Method Summary collapse

Methods inherited from DepAnalyzer

#decorate, #initialize, #run, #setup

Methods inherited from Cache

#cache, #initialize

Constructor Details

This class inherits a constructor from DepAnalyzer

Instance Method Details

#deps(port) ⇒ Object



16
17
18
# File 'lib/homebrew_analyzer.rb', line 16

def deps port
  `brew deps #{port}`.scan(/\S+/)
end

#installedObject



4
5
6
7
8
# File 'lib/homebrew_analyzer.rb', line 4

def installed
  # don't cache so it updates every delete
  puts "scanning installed ports"
  `brew list`.scan(/\S+/).map { |s| s.split.first }
end

#outdatedObject



10
11
12
13
14
# File 'lib/homebrew_analyzer.rb', line 10

def outdated
  # don't cache so it updates every delete
  puts "scanning outdated ports"
  `brew outdated`.split(/\n/).map { |s| s.split.first }
end