Remove previous version detection commit #1092

This commit is contained in:
ethicalhack3r
2017-05-02 16:13:54 +02:00
parent 20af778fa1
commit d65567fc8f
2 changed files with 7 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ class WpItem
def extract_version(body)
version = body[/\b(?:stable tag|version):\s*(?!trunk)([0-9a-z\.-]+)/i, 1]
if version.nil? || version !~ /[0-9]+/
extracted_versions = body.scan(/[=]+\s+(?:v(?:ersion)?\s*)?([0-9\.-]+)\s[ \ta-z0-9\/\(\)\.-]*[=]+/i)
extracted_versions = body.scan(/[=]+\s+(?:v(?:ersion)?\s*)?([0-9\.-]+)[ \ta-z0-9\(\)\.-]*[=]+/i)
return if extracted_versions.nil? || extracted_versions.length == 0
extracted_versions.flatten!
# must contain at least one number

View File

@@ -139,12 +139,12 @@ shared_examples 'WpItem::Versionable' do
end
end
context 'when parsing the changelog for version numbers with dates' do
it 'returns it' do
@file = '/wp-maintenance-mode.txt'
@expected = '2.0.9'
end
end
# context 'when parsing the changelog for version numbers with dates' do
# it 'returns it' do
# @file = '/wp-maintenance-mode.txt'
# @expected = '2.0.9'
# end
# end
end
end
end