lib/atp/processors/flow_id.rb in atp-0.3.1 vs lib/atp/processors/flow_id.rb in atp-0.3.2

- old
+ new

@@ -8,18 +8,30 @@ @id = id process(node) end def on_id(node) - node.updated(nil, ["#{node.value}_#{id}"]) + if node.value =~ /^extern/ + node + else + node.updated(nil, ["#{node.value}_#{id}"]) + end end def on_test_result(node) tid, state, nodes = *node if tid.is_a?(Array) - tid = tid.map { |tid| "#{tid}_#{id}" } + tid = tid.map do |tid| + if tid =~ /^extern/ + tid + else + "#{tid}_#{id}" + end + end else - tid = "#{tid}_#{id}" + if tid !~ /^extern/ + tid = "#{tid}_#{id}" + end end node.updated(nil, [tid, state] + [process(nodes)]) end alias_method :on_test_executed, :on_test_result end