[refs #42] Fix rpm name parse into Download parse method

This commit is contained in:
konstantin.grabar 2011-12-14 15:09:22 +04:00
parent bd8788fe49
commit 1d6df950c4
1 changed files with 1 additions and 1 deletions

View File

@ -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],