Remove previous version detection commit #1092
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user