From 1d6df950c4232f7b0af3bd8033488874e57332f0 Mon Sep 17 00:00:00 2001 From: "konstantin.grabar" Date: Wed, 14 Dec 2011 15:09:22 +0400 Subject: [PATCH] [refs #42] Fix rpm name parse into Download parse method --- app/models/download.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/download.rb b/app/models/download.rb index 3623ad8b3..6d0630bbf 100644 --- a/app/models/download.rb +++ b/app/models/download.rb @@ -12,7 +12,7 @@ class Download < ActiveRecord::Base def parse_nginx_log File.open(PREV_LOG_FILE) do |log| while (line = log.gets) - if package = line.match( /GET \/.+\/([\w\d]+)-([\d.]+)-((\d+mdv[\d.]+)|([\d\w]+-mdv[\d.]+))\.([\w\d]+)\.rpm/ ) + if package = line.match( /GET \/.+\/([\w\d-]+)-([\d.]+)-((\d+mdv[\d.]+)|([\d\w]+-mdv[\d.]+))\.([\w\d]+)\.rpm/ ) increase( :name => package[1], :version => package[2],