lib/prosopite.rb in prosopite-1.0.3 vs lib/prosopite.rb in prosopite-1.0.4

- old
+ new

@@ -36,10 +36,18 @@ def tc Thread.current end + def pause + tc[:prosopite_scan] = false + end + + def resume + tc[:prosopite_scan] = true + end + def scan? tc[:prosopite_scan] end def finish @@ -62,13 +70,15 @@ rescue raise q end end + next unless fingerprints.uniq.size == 1 + kaller = tc[:prosopite_query_caller][location_key] is_allowed = kaller.any? { |f| @allow_list.concat(DEFAULT_ALLOW_LIST).any? { |s| f.include?(s) } } - if fingerprints.uniq.size == 1 && !is_allowed + unless is_allowed queries = tc[:prosopite_query_holder][location_key] tc[:prosopite_notifications][queries] = kaller end end end