lib/basquiat/adapters/rabbitmq/events.rb in basquiat-1.2.0 vs lib/basquiat/adapters/rabbitmq/events.rb in basquiat-1.3.0.pre.1

- old
+ new

@@ -25,13 +25,13 @@ @exact.fetch(key) { simple_pattern_match(key) } rescue KeyError raise KeyError, "No event handler found for #{key}" end - # event.for.the.win, event.for.everyone, event.for.* private def set_pattern_key(key, value) + key = key.gsub('.', '\.') key = if key =~ /\*/ /^#{key.gsub('*', '[^.]+')}$/ else /^#{key.gsub(/\#/, '.*')}$/ end