mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Improve checking for Cloud Queue message IDs.
The previous regex failed if the queue name contained a "-".
This commit is contained in:
parent
a19433687c
commit
5449c6a566
1 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,8 @@ module Fog
|
|||
def identity
|
||||
return nil unless href
|
||||
|
||||
match = href.match(/(\/(\w+))*\??/)
|
||||
match ? match[-1] : nil
|
||||
match = href.match(/\A.*\/queues\/[a-zA-Z0-9_-]{0,64}\/messages\/(?<id>.+?)(?:\?|\z)/i)
|
||||
match ? match['id'] : nil
|
||||
end
|
||||
alias :id :identity
|
||||
|
||||
|
|
Loading…
Reference in a new issue