Skip to content

Commit

Permalink
Add .rb files as Ruby, and fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaran committed Dec 5, 2008
1 parent 6dd5f67 commit 7af468f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Support/bin/scanner.rb
Expand Up @@ -38,6 +38,7 @@ def create_schema

@language_associations = {
'php' => [/\.php$/, /\.inc$/],
'ruby' => [/\.rb$/],
}

def language_for(file)
Expand All @@ -64,8 +65,10 @@ def language_for(file)
step = 100.0 / files.size.to_f
progress = 0
files.each do |script|
dialog.parameters = {'summary' => "Parsing #{script}", 'progressValue' => progress}
update_database script, parse_file(script)
if language = language_for(script)
dialog.parameters = {'summary' => "Parsing #{script}", 'progressValue' => progress}
update_database script, parse_file(script, language)
end
progress += step
end
end
Expand Down

0 comments on commit 7af468f

Please sign in to comment.