Class: MacportsAnalyzer
- Inherits:
-
DepAnalyzer
- Object
- Cache
- DepAnalyzer
- MacportsAnalyzer
- Defined in:
- lib/macports_analyzer.rb
Overview
:stopdoc:
Instance Attribute Summary
Attributes inherited from DepAnalyzer
Instance Method Summary collapse
Methods inherited from DepAnalyzer
#decorate, #initialize, #run, #setup
Methods inherited from Cache
Constructor Details
This class inherits a constructor from DepAnalyzer
Instance Method Details
#deps(port) ⇒ Object
18 19 20 21 22 |
# File 'lib/macports_analyzer.rb', line 18 def deps port cache("#{port}.deps") { `port deps #{port}` }.scan(/Dependencies:\s*(.+)$/).join(', ').split(/, /) end |
#installed ⇒ Object
6 7 8 9 10 |
# File 'lib/macports_analyzer.rb', line 6 def installed # don't cache so it updates every delete puts "scanning installed ports" `port installed`.split(/\n/)[1..-1].map { |s| s.split.first } end |
#outdated ⇒ Object
12 13 14 15 16 |
# File 'lib/macports_analyzer.rb', line 12 def outdated # don't cache so it updates every delete puts "scanning outdated ports" `port outdated`.split(/\n/)[1..-1].map { |s| s.split.first } end |