lib/mailgun/events/events.rb in mailgun-ruby-1.1.9 vs lib/mailgun/events/events.rb in mailgun-ruby-1.1.10
- old
+ new
@@ -99,10 +99,10 @@
# response - the endpoint for the previous/next page
#
# Returns a String of the partial URI if the given url follows the regular API format
# Returns nil in other cases (e.g. when given nil, or an irrelevant url)
def extract_endpoint_from(url = nil)
- URI.parse(url).path[/api.mailgun.net\/v[\d]\/#{@domain}\/events\/(.+)/,1]
+ URI.parse(url).path[/\/v[\d]\/#{@domain}\/events\/(.+)/,1]
rescue URI::InvalidURIError
nil
end
# Internal: construct the event path to be used by the client