pdfcrowd 5.12.0 → 5.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfcrowd.rb +10 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e9ead18e25818ca273cb083afa7c71972b32ae7b1dde2bad0f627fa938f1fb2
4
- data.tar.gz: e2db755bfd4fcc1cb0b07008980a0b0fc5b8725dc69c1dee66b9e96c164ce5b9
3
+ metadata.gz: 54cd69d25cfda77bbca04f440303be338382e9392091e9b1a9dd3f34f882cb1e
4
+ data.tar.gz: d0c5e879c75a8f62a191ecb12dc1cab7d0301e75380337223729aa715ae7b59a
5
5
  SHA512:
6
- metadata.gz: e64915870affbacefc774cec4cc2fecc80e6aceb36cc902c82000a3eee4961f2fb2e45b4974ae30ed19d2f9243b1a936f137e3853d1c4151eb8de2dfcc763f25
7
- data.tar.gz: 641de5978ca2174f15764a7069a8cd1d441c18acb57b4b3c597c923207086cec9745b5d64348499dbaa80bae135ac26bb9b779b91dc7621895ea598a310bbcc5
6
+ metadata.gz: 2ef4b55ad852187274578c9c91a1fbb309c34706a1bf7fd8b85b9f1c84ab757e256228fa84b1dd6a26893cd02b77af391b598c05a979fcd296f8b99e6b541038
7
+ data.tar.gz: b79f66e6e0224b611b7d6941d438ad156809eb79ed0957a61844e0bbe0752262941cdfe37d65f3afe281fc87dc171ad2dce234e351ba2c6b2e4df8990f4dd1a5
data/lib/pdfcrowd.rb CHANGED
@@ -530,7 +530,7 @@ end
530
530
  module Pdfcrowd
531
531
  HOST = ENV["PDFCROWD_HOST"] || 'api.pdfcrowd.com'
532
532
  MULTIPART_BOUNDARY = '----------ThIs_Is_tHe_bOUnDary_$'
533
- CLIENT_VERSION = '5.12.0'
533
+ CLIENT_VERSION = '5.12.1'
534
534
 
535
535
  class ConnectionHelper
536
536
  def initialize(user_name, api_key)
@@ -541,7 +541,7 @@ module Pdfcrowd
541
541
 
542
542
  setProxy(nil, nil, nil, nil)
543
543
  setUseHttp(false)
544
- setUserAgent('pdfcrowd_ruby_client/5.12.0 (https://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/5.12.1 (https://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  @converter_version = '20.10'
@@ -681,7 +681,7 @@ module Pdfcrowd
681
681
  begin
682
682
  return exec_request(request, out_stream)
683
683
  rescue Error => err
684
- if err.getCode() == '502' and @retry_count > @retry
684
+ if (err.getCode() == '502' or err.getCode() == '503') and @retry_count > @retry
685
685
  @retry += 1
686
686
  sleep(@retry * 0.1)
687
687
  else
@@ -707,10 +707,6 @@ module Pdfcrowd
707
707
  @total_page_count = (response["X-Pdfcrowd-Total-Pages"] || 0).to_i
708
708
  @output_size = (response["X-Pdfcrowd-Output-Size"] || 0).to_i
709
709
 
710
- raise Error.new('test 502', '502') \
711
- if ENV["PDFCROWD_UNIT_TEST_MODE"] and
712
- @retry_count > @retry
713
-
714
710
  case response
715
711
  when Net::HTTPSuccess
716
712
  if out_stream
@@ -2396,7 +2392,7 @@ module Pdfcrowd
2396
2392
  self
2397
2393
  end
2398
2394
 
2399
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
2395
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
2400
2396
  #
2401
2397
  # * +count+ - Number of retries.
2402
2398
  # * *Returns* - The converter object.
@@ -3180,7 +3176,7 @@ module Pdfcrowd
3180
3176
  self
3181
3177
  end
3182
3178
 
3183
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
3179
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
3184
3180
  #
3185
3181
  # * +count+ - Number of retries.
3186
3182
  # * *Returns* - The converter object.
@@ -3788,7 +3784,7 @@ module Pdfcrowd
3788
3784
  self
3789
3785
  end
3790
3786
 
3791
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
3787
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
3792
3788
  #
3793
3789
  # * +count+ - Number of retries.
3794
3790
  # * *Returns* - The converter object.
@@ -4356,7 +4352,7 @@ module Pdfcrowd
4356
4352
  self
4357
4353
  end
4358
4354
 
4359
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
4355
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
4360
4356
  #
4361
4357
  # * +count+ - Number of retries.
4362
4358
  # * *Returns* - The converter object.
@@ -5273,7 +5269,7 @@ module Pdfcrowd
5273
5269
  self
5274
5270
  end
5275
5271
 
5276
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
5272
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
5277
5273
  #
5278
5274
  # * +count+ - Number of retries.
5279
5275
  # * *Returns* - The converter object.
@@ -5730,7 +5726,7 @@ module Pdfcrowd
5730
5726
  self
5731
5727
  end
5732
5728
 
5733
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
5729
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
5734
5730
  #
5735
5731
  # * +count+ - Number of retries.
5736
5732
  # * *Returns* - The converter object.
@@ -6229,7 +6225,7 @@ module Pdfcrowd
6229
6225
  self
6230
6226
  end
6231
6227
 
6232
- # Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
6228
+ # Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
6233
6229
  #
6234
6230
  # * +count+ - Number of retries.
6235
6231
  # * *Returns* - The converter object.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfcrowd
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.12.0
4
+ version: 5.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pdfcrowd Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-31 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Pdfcrowd API lets you easily convert between HTML, PDF and various
14
14
  image formats.