lib/technologist/framework_detector.rb in technologist-0.1.0 vs lib/technologist/framework_detector.rb in technologist-0.2.0

- old
+ new

@@ -32,16 +32,10 @@ def matched_frameworks @frameworks ||= begin rules.map do |technology, definition| definition['rules'].map do |rule| - rule = rule.flatten - file_name = rule.first - pattern = rule.last - # may use single or double quotes - pattern = pattern.gsub(/["']/, %q{["']}) - - if repository.file_content(file_name) =~ /#{pattern}/ + if rule.matches?(technology, repository) technology end end end.flatten.compact end