lib/u3d/log_analyzer.rb in u3d-0.9 vs lib/u3d/log_analyzer.rb in u3d-0.9.1

- old
+ new

@@ -36,15 +36,14 @@ @rule_lines_buffer = [] @generic_rules, @phases = load_rules end def load_rules - data = {} generic_rules = {} phases = {} - File.open(RULES_PATH, 'r') do |f| - data = JSON.parse(f.read) - end + + data = JSON.parse(File.read(RULES_PATH)) + if data['GENERAL'] && data['GENERAL']['active'] data['GENERAL']['rules'].each do |rn, r| generic_rules[rn] = r if parse_rule(r) end end