idr_cloud_client 1.0.5 → 2.0.0

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
  SHA256:
3
- metadata.gz: b86eadd2984214a20e5e921b803625ea8ddd613a8ff3a863fc58973008e75f71
4
- data.tar.gz: 8a2e3cf53c49dbeff654bf77c64687f31304228b39e90544dc055184711bd416
3
+ metadata.gz: 243edc30989fcbdf3b684228e4ccbd0798f1ec156a8d0509b67a7a2a9e1889e7
4
+ data.tar.gz: 3e40f1fa2f3e718657956dfd92fbee070e1be814ea4008c502cb00e9b5e8bfe7
5
5
  SHA512:
6
- metadata.gz: 952a230decb1094979cdade0a67f85309c841d41bf9c2bece3d4270528d4f556bf69a39418a8c4acfd5e0684570585e8f9c5f5b5009d02edcdff9d22a0d6c97f
7
- data.tar.gz: 99bcac0b96d42db05a42bea8873604785d993b33841a009e6e589ffe3ca49c7e8cb0aadd73bf835fa9b223a75e51a4508bb72ccb1b8263972fd3a7b43b39d083
6
+ metadata.gz: fddac3d7bbcaf632b27628f14d2b85ab0d614782323b45f4032c43cb5e4ec3774110a35cd8690a2479df2166c55b6d3f98a8c0efac19430e474b2495c5420207
7
+ data.tar.gz: 75962d891e7435e3cd17a5f910adacb3509680447763314ebd27d18d9fb7250a2ca98e7e33c60b3ed5cdcef5276f327827c52d95615b93133b6db0be8e80d4cb
data/README.md CHANGED
@@ -77,7 +77,7 @@ Short version: Don't be an awful person.
77
77
  Longer version: Everyone interacting in the BuildVu Ruby Client project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
78
78
 
79
79
  -----
80
- Copyright 2020 IDRsolutions
80
+ Copyright 2021 IDRsolutions
81
81
 
82
82
  Licensed under the Apache License, Version 2.0 (the "License");
83
83
  you may not use this file except in compliance with the License.
@@ -7,8 +7,8 @@ client = IDRCloudClient.new('http://localhost:80/' + IDRCloudClient::JPEDAL)
7
7
  conversion_results = client.convert(input: IDRCloudClient::UPLOAD, file: 'path/to/file.pdf')
8
8
 
9
9
  # You can specify other parameters for the API as named parameters, for example
10
- # here is the use of the callbackUrl parameter which is a URL that you want to
11
- # be updated when the conversion finishes.
10
+ # here is the use of the callbackUrl parameter which is a URL that you want to
11
+ # be updated when the conversion finishes.
12
12
  # See https://github.com/idrsolutions/jpedal-microservice-example/blob/master/API.md
13
13
  #conversion_results = client.convert input: IDRCloudClient::UPLOAD, callbackUrl: 'http://listener.url'
14
14
 
@@ -1,3 +1,3 @@
1
1
  class IDRCloudClient
2
- VERSION = "1.0.5"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright 2018 IDRsolutions
2
+ # Copyright 2021 IDRsolutions
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
5
  # you may not use this file except in compliance with the License.
@@ -41,9 +41,9 @@ class IDRCloudClient
41
41
  # Constructor, setup the converter details
42
42
  # Params:
43
43
  # +url+:: string, the URL of the web service.
44
- # +conversion_timeout+:: int, (optional) the time to wait (in seconds) before timing out. Set to 30 by default.
44
+ # +conversion_timeout+:: int, (optional) the time to wait (in seconds) before timing out. Values <= 0 are treated as infinite. Set to -1 by default.
45
45
  # +auth+:: array, (optional) the username and password to use for HTTP Authentication. Set to nil by default
46
- def initialize(url, conversion_timeout: 30, auth: nil)
46
+ def initialize(url, conversion_timeout: -1, auth: nil)
47
47
  @base_endpoint = url
48
48
  @endpoint = @base_endpoint
49
49
  @convert_timeout = conversion_timeout
@@ -62,8 +62,12 @@ class IDRCloudClient
62
62
  uuid = upload params
63
63
 
64
64
  response = nil
65
+ poll_limit = @convert_timeout;
66
+ if poll_limit <= 0
67
+ poll_limit = Float::INFINITY
68
+ end
65
69
  # check conversion status once every second until complete or error / timeout
66
- (0..@convert_timeout).each do |i|
70
+ (0..poll_limit).each do |i|
67
71
  sleep 1
68
72
  response = poll_status uuid
69
73
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idr_cloud_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - IDRsolutions
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-14 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -71,7 +71,7 @@ homepage: https://github.com/idrsolutions/idrsolutions-ruby-client
71
71
  licenses:
72
72
  - Apache-2.0
73
73
  metadata: {}
74
- post_install_message:
74
+ post_install_message:
75
75
  rdoc_options: []
76
76
  require_paths:
77
77
  - lib
@@ -86,8 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.0.8
90
- signing_key:
89
+ rubygems_version: 3.0.3
90
+ signing_key:
91
91
  specification_version: 4
92
92
  summary: Ruby API for IDRSolutions Microservices
93
93
  test_files: []