Skip to content

Commit

Permalink
Changing the FlogAnalyzer to reflect the new data structure of the fl…
Browse files Browse the repository at this point in the history
…og data in metric_fu
  • Loading branch information
Jake Scruggs committed Nov 5, 2010
1 parent 3f00e63 commit b214d0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/base/flog_analyzer.rb
Expand Up @@ -25,13 +25,13 @@ def score(metric_ranking, item)

def generate_records(data, table)
return if data==nil
Array(data[:pages]).each do |page|
file_path = page[:path].sub(%r{^/},'')
Array(page[:scanned_methods]).each do |entry|
location = Location.for(entry[:name])
Array(data[:method_containers]).each do |method_container|
Array(method_container[:methods]).each do |entry|
file_path = entry[1][:path].sub(%r{^/},'') if entry[1][:path]
location = Location.for(entry.first)
table << {
"metric" => name,
"score" => entry[:score],
"score" => entry[1][:score],
"file_path" => file_path,
"class_name" => location.class_name,
"method_name" => location.method_name
Expand Down

0 comments on commit b214d0b

Please sign in to comment.