docusign_rest 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ccbc36fbd85a3a3877b0544d06815b2285733d8
4
- data.tar.gz: e4643593b678f44ac07d5e49b29e475a0f4cb9f6
3
+ metadata.gz: bdb021e304348e2c6293c63d2583fd168c5bdc6f
4
+ data.tar.gz: 69316a49c95e3e671912222eef2347c59b8d1958
5
5
  SHA512:
6
- metadata.gz: 443efae0c8be114ec26b936a275c3cc35ba59ecb9f49da16db1ffce9563984a06b0964c0151af05eb3ac834c29cda735d824b4e331aa66bc0ea9767162747c92
7
- data.tar.gz: '0669fbd06e42db5ed2033e9bf72a503ad5e12fc0584e78c36a48be6db22d561daeef525a16a2bd427c735dda8ce947f22a45ecc9ecf6fe61c5dc83d205d4169f'
6
+ metadata.gz: 5a83e2ba0db64dc85c0e270a11c26b885aa4fd0cdcbba6fba827b2d27997a4b50eaa2eb3d2ccb5d3ee37e198c72c263ce5e8e1a5e1ed5a9d6c6bbfcfe48106c0
7
+ data.tar.gz: 2b6316008099ae29646723cf4105dc57f06593acd41ae805a40ac3b4a43a040718c15671f9743f6ce9e1ce5bc4eae5b572375e3ea9bc32bfb85b98b1c209fd51
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.9 Apr 12 2018
4
+ * Handle another error condition when logging (Tom Copeland)
5
+
3
6
  ## v0.3.8 Mar 15 2018
4
7
  * Allow require_sign_on_paper option in create_envelope_from_document (Micah Iriye)
5
8
 
@@ -1972,7 +1972,15 @@ module DocusignRest
1972
1972
  request.each_capitalized{ |k,v| log << "#{k}: #{v.gsub(/(?<="Password":")(.+?)(?=")/, '[FILTERED]')}" }
1973
1973
  # Trims out the actual binary file to reduce log size
1974
1974
  if request.body
1975
- request_body = request.body.gsub(/(?<=Content-Transfer-Encoding: binary).+?(?=-------------RubyMultipartPost)/m, "\n[BINARY BLOB]\n")
1975
+ request_body = begin
1976
+ request.body.gsub(/(?<=Content-Transfer-Encoding: binary).+?(?=-------------RubyMultipartPost)/m, "\n[BINARY BLOB]\n")
1977
+ rescue ArgumentError => ae
1978
+ if ae.message == "invalid byte sequence in UTF-8"
1979
+ request.body.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '').gsub(/^%PDF.*%%EOF/m, "\n[PDF BLOB]\n")
1980
+ else
1981
+ raise
1982
+ end
1983
+ end
1976
1984
  log << "Body: #{request_body}"
1977
1985
  end
1978
1986
  log << '--DocuSign RESPONSE--'
@@ -1,3 +1,3 @@
1
1
  module DocusignRest
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docusign_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Kinney
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-15 00:00:00.000000000 Z
12
+ date: 2018-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multipart-post