Class: FreebsdAnalyzer

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

Overview

:stopdoc:

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



18
19
20
21
22
# File 'lib/freebsd_analyzer.rb', line 18

def deps port
  cache("#{port}.deps") {
    `pkg_info -r #{port}`
  }.grep(/Dependency:/).map { |s| s.split[1] }
end

#installedObject



6
7
8
9
10
# File 'lib/freebsd_analyzer.rb', line 6

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

#outdatedObject



12
13
14
15
16
# File 'lib/freebsd_analyzer.rb', line 12

def outdated
  # don't cache so it updates every delete
  puts "scanning outdated ports"
  `pkg_version -vL=`.split(/\n/)[1..-1].map { |s| s.split.first }
end