From e41f98b8e711301b6e31e86b3a336241f9b19edf Mon Sep 17 00:00:00 2001 From: Benjamin Krein Date: Thu, 20 Nov 2014 18:59:47 -0500 Subject: [PATCH] make regex case-insensitive Current Puppet outputs the 'Info' tag with a capital but the regex has it all lowercase. Added case-insensitive flag to the regex so it should work either way. --- lib/puppet-profiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet-profiler.rb b/lib/puppet-profiler.rb index b3698e9..0714860 100644 --- a/lib/puppet-profiler.rb +++ b/lib/puppet-profiler.rb @@ -5,7 +5,7 @@ def self.run(num_res, cmd) times = [] output.each { |line| - if line =~ /info: .*([A-Z][^\[]+)\[(.+?)\]: Evaluated in ([\d\.]+) seconds$/ + if line =~ /info: .*([A-Z][^\[]+)\[(.+?)\]: Evaluated in ([\d\.]+) seconds$/i type = $1 title = $2 time = $3.to_f