salesforcebulk 4.0.0 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/salesforce_bulk/client.rb +1 -1
- data/lib/salesforce_bulk/salesforce_error.rb +18 -15
- data/lib/salesforce_bulk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42ac9c846c52bca60cea6a59ef20772e9f73752f4a6033767b7686ab5db36c79
|
4
|
+
data.tar.gz: 730c25ca9264445f4493740f294c09427e56f58236f2b12ea044c8fdc855b26f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aa5f86d57dfeb8eb463e0f7a444d5f757622ba5e26a73013c3e58b3de20c0464de541c3edef878b72a8d081ec9acac7cf99f0353f03d58942b4b583e17fc485
|
7
|
+
data.tar.gz: ae2bc3c0bd319fd7f3dbde38f34233e4aadfb06af0dfba06bd53be88be477401259d22b3690c956da23c6c74940c72238f85fbf5f25398e067ee4bfef735716f
|
@@ -47,7 +47,7 @@ module SalesforceBulk
|
|
47
47
|
xml += "<env:Body>"
|
48
48
|
xml += '<n1:login xmlns:n1="urn:partner.soap.sforce.com">'
|
49
49
|
xml += "<n1:username>#{username}</n1:username>"
|
50
|
-
xml += "<n1:password>#{password}</n1:password>"
|
50
|
+
xml += "<n1:password>#{password.encode(xml: :text)}</n1:password>"
|
51
51
|
xml += "</n1:login>"
|
52
52
|
xml += "</env:Body>"
|
53
53
|
xml += "</env:Envelope>\n"
|
@@ -5,25 +5,28 @@ module SalesforceBulk
|
|
5
5
|
attr_accessor :response
|
6
6
|
# The status code from the server response body.
|
7
7
|
attr_accessor :error_code
|
8
|
-
|
8
|
+
|
9
9
|
def initialize(response)
|
10
10
|
self.response = response
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
|
11
|
+
self.error_code = response.code
|
12
|
+
|
13
|
+
if (300..308).cover?(error_code.to_i)
|
14
|
+
message = "Moved to #{response.header['location']}"
|
15
|
+
else
|
16
|
+
data = XmlSimple.xml_in(response.body, 'ForceArray' => false)
|
17
|
+
|
18
|
+
if data
|
19
|
+
# seems responses for CSV requests use a different XML return format
|
20
|
+
# (use invalid_error.xml for reference)
|
21
|
+
if !data['exceptionMessage'].nil?
|
22
|
+
message = data['exceptionMessage']
|
23
|
+
else
|
24
|
+
# SOAP error response
|
25
|
+
message = data['Body']['Fault']['faultstring']
|
26
|
+
end
|
22
27
|
end
|
23
|
-
|
24
|
-
self.error_code = response.code
|
25
28
|
end
|
26
|
-
|
29
|
+
|
27
30
|
super(message)
|
28
31
|
end
|
29
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesforcebulk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.3.6
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Full capability support for the Salesforce Bulk API.
|