salesforce_bulk 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -83,7 +83,13 @@ module SalesforceBulk
|
|
83
83
|
def parse_instance()
|
84
84
|
@server_url =~ /https:\/\/([a-z]{2,2}[0-9]{1,2})(-api)?/
|
85
85
|
if $~.nil?
|
86
|
-
|
86
|
+
# Check for a "My Domain" subdomain
|
87
|
+
@server_url =~ /https:\/\/[a-zA-Z\-0-9]*.([a-z]{2,2}[0-9]{1,2})(-api)?/
|
88
|
+
if $~.nil?
|
89
|
+
raise "Unable to parse Salesforce instance from server url (#{@server_url})."
|
90
|
+
else
|
91
|
+
@instance = $~.captures[0]
|
92
|
+
end
|
87
93
|
else
|
88
94
|
@instance = $~.captures[0]
|
89
95
|
end
|