Class: RakeAnalyzer
- Inherits:
-
DepAnalyzer
- Object
- Cache
- DepAnalyzer
- RakeAnalyzer
- Defined in:
- lib/rake_analyzer.rb
Instance Attribute Summary
Attributes inherited from DepAnalyzer
Instance Method Summary collapse
Methods inherited from DepAnalyzer
#decorate, #deps, #initialize, #installed, #outdated, #setup
Methods inherited from Cache
Constructor Details
This class inherits a constructor from DepAnalyzer
Instance Method Details
#run ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rake_analyzer.rb', line 5 def run digraph do rotate boxes current = nil rake = Gem.bin_path('rake', 'rake') rescue 'rake' path = $:.join File::PATH_SEPARATOR `#{Gem.ruby} -I#{path} -S #{rake} -P -s`.each_line do |line| case line when /^rake (.+)/ name = $1 current = name node current if current when /^\s+(.+)/ dep = $1 next if current =~ /pkg/ and File.file? dep edge current, dep if current else warn "unparsed: #{line.chomp}" end end end end |