[refs #42] Fix rpm name parse into Download parse method
This commit is contained in:
parent
bd8788fe49
commit
1d6df950c4
|
@ -12,7 +12,7 @@ class Download < ActiveRecord::Base
|
||||||
def parse_nginx_log
|
def parse_nginx_log
|
||||||
File.open(PREV_LOG_FILE) do |log|
|
File.open(PREV_LOG_FILE) do |log|
|
||||||
while (line = log.gets)
|
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(
|
increase(
|
||||||
:name => package[1],
|
:name => package[1],
|
||||||
:version => package[2],
|
:version => package[2],
|
||||||
|
|
Loading…
Reference in New Issue