Skip to content
Browse files

Add .rb files as Ruby, and fix a bug

  • Loading branch information...
1 parent 6dd5f67 commit 7af468f655c8dc6dcacc8cd0e88f8eb9c936d56f @ciaran committed Dec 5, 2008
Showing with 5 additions and 2 deletions.
  1. +5 −2 Support/bin/scanner.rb
View
7 Support/bin/scanner.rb
@@ -38,6 +38,7 @@ def create_schema
@language_associations = {
'php' => [/\.php$/, /\.inc$/],
+ 'ruby' => [/\.rb$/],
}
def language_for(file)
@@ -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

0 comments on commit 7af468f

Please sign in to comment.
Something went wrong with that request. Please try again.