Sha256: a4c10e699f68e75c66829953bfe55905b29a9ea9f77f22f60f341af112c81a3f

Contents?: true

Size: 537 Bytes

Versions: 11

Compression:

Stored size: 537 Bytes

Contents

require 'dep_analyzer'

class MacportsAnalyzer < DepAnalyzer
  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

  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

  def deps port
    cache("#{port}.deps") {
      `port deps #{port}`
    }.scan(/Dependencies:\s*(.+)$/).join(', ').split(/, /)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
graph-2.5.1 lib/macports_analyzer.rb
graph-2.5.0 lib/macports_analyzer.rb
graph-2.4.1 lib/macports_analyzer.rb
graph-2.4.0 lib/macports_analyzer.rb
graph-2.3.1 lib/macports_analyzer.rb
graph-2.3.0 lib/macports_analyzer.rb
graph-2.2.0 lib/macports_analyzer.rb
graph-2.1.0 lib/macports_analyzer.rb
graph-2.0.1 lib/macports_analyzer.rb
graph-2.0.0 lib/macports_analyzer.rb
graph-1.2.0 lib/macports_analyzer.rb