Sha256: 0fab395a7164c3d35df197caa2e7910043e672814b5eb1f58cd473f6e243a15b

Contents?: true

Size: 441 Bytes

Versions: 10

Compression:

Stored size: 441 Bytes

Contents

require 'dep_analyzer'

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

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

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