Modified the parse_instance() method inside SalesforecBulkApi Module to accommodate domain names that start with 2 alphabets and are followed by digits.
If the domain name is something like 'ab12cdef' and the salesforce instance url is 'ab12cdef.my.salesforce.com'.
The original code would evaluate the instance to ab12.salesforce.com
That would result in "Failed to open TCP connection to ab12.salesforce.com:443 (getaddrinfo: Name or service not known)" error as the host could not be resolved.
I have changed the evaluation of the @instance as follows:
@instance = @server_url.match(/https:\/\/[a-z]{2}[0-9]{1,2}./).to_s.gsub("https://","").split(".")[0]
@instance = @server_url.split(".salesforce.com")[0].split("://")[1] if @instance.nil? || @instance.empty?
Added instructions to the README to show OAuth2 mode of authentication and the mandatory options to pass to restforce client while using client.authenticate!
If the domain name is something like 'ab12cdef' and the salesforce instance url is 'ab12cdef.my.salesforce.com'. The original code would evaluate the instance to ab12.salesforce.com That would result in "Failed to open TCP connection to ab12.salesforce.com:443 (getaddrinfo: Name or service not known)" error as the host could not be resolved.
I have changed the evaluation of the @instance as follows:
@instance = @server_url.match(/https:\/\/[a-z]{2}[0-9]{1,2}./).to_s.gsub("https://","").split(".")[0] @instance = @server_url.split(".salesforce.com")[0].split("://")[1] if @instance.nil? || @instance.empty?