diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-11-26 12:46:11 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-11-26 12:46:11 +0000 |
commit | 63479ee9a78328ec5068cbbec13db5fb6d29bb1f (patch) | |
tree | 5cf5fe763ed42925f3b63f73d22d64ba3ac2d73f | |
parent | 777f5e78c4ebe193efd631189bb2c09f1bac2df0 (diff) | |
parent | 171cd53005c439ab76f2e8ca41d13b9b329a800c (diff) |
Merge branch 'feature/restore-caching' into wdtk
-rw-r--r-- | lib/tasks/temp.rake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/temp.rake b/lib/tasks/temp.rake index bdee3027b..67fa10174 100644 --- a/lib/tasks/temp.rake +++ b/lib/tasks/temp.rake @@ -12,10 +12,10 @@ namespace :temp do f = is_gz ? Zlib::GzipReader.open(log_file_path) : File.open(log_file_path, 'r') processed = 0 f.each_line do |line| - line.force_encoding('ASCII-8BIT') - if request_match = line.match(/^Started (?<method>GET|OPTIONS|POST) "(?<path>\/request\/.*?)"/) + line.force_encoding('ASCII-8BIT') if RUBY_VERSION.to_f >= 1.9 + if request_match = line.match(/^Started (GET|OPTIONS|POST) "(\/request\/.*?)"/) next if line.match(/request\/\d+\/response/) - urls[request_match[:path]] += 1 + urls[request_match[2]] += 1 processed += 1 end end |