Sha256: 88994c790c229290a4a844e587e859106b6186734daff60983df49db64497350

Contents?: true

Size: 550 Bytes

Versions: 13

Compression:

Stored size: 550 Bytes

Contents

require 'dep_analyzer'

# :stopdoc:

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

13 entries across 13 versions & 1 rubygems

Version Path
graph-2.11.1 lib/macports_analyzer.rb
graph-2.11.0 lib/macports_analyzer.rb
graph-2.10.0 lib/macports_analyzer.rb
graph-2.9.1 lib/macports_analyzer.rb
graph-2.9.0 lib/macports_analyzer.rb
graph-2.8.2 lib/macports_analyzer.rb
graph-2.8.1 lib/macports_analyzer.rb
graph-2.8.0 lib/macports_analyzer.rb
graph-2.7.1 lib/macports_analyzer.rb
graph-2.7.0 lib/macports_analyzer.rb
graph-2.6.0 lib/macports_analyzer.rb
graph-2.5.3 lib/macports_analyzer.rb
graph-2.5.2 lib/macports_analyzer.rb