idr_cloud_client 1.0.3 → 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: 80d1b5f3eaddb31231b46d44e91b64eb658f5b496133e1b000e838c5158aa549
4
- data.tar.gz: 87992fdac6eb6bad76187cc9fbfb529932994020f5f280d746a0c952b3e0c696
3
+ metadata.gz: 243edc30989fcbdf3b684228e4ccbd0798f1ec156a8d0509b67a7a2a9e1889e7
4
+ data.tar.gz: 3e40f1fa2f3e718657956dfd92fbee070e1be814ea4008c502cb00e9b5e8bfe7
5
5
  SHA512:
6
- metadata.gz: 50b27ae8b6b0f8b21cc0b1173ddd3e87cc7b96eff44848f4bd46437274ae501fa1296cc1edf3fe0210a01ef2644774e6eec5145706b653f638098bc3718fa35a
7
- data.tar.gz: fb12b668f58e88ec0b57e9837cb426867e3cf4d661037d2220c4892321bcd8cfd1a8701c6907bbd35d3e1821524f12d0be1677cf5aee2c5fbc2ad77614fda72e
6
+ metadata.gz: fddac3d7bbcaf632b27628f14d2b85ab0d614782323b45f4032c43cb5e4ec3774110a35cd8690a2479df2166c55b6d3f98a8c0efac19430e474b2495c5420207
7
+ data.tar.gz: 75962d891e7435e3cd17a5f910adacb3509680447763314ebd27d18d9fb7250a2ca98e7e33c60b3ed5cdcef5276f327827c52d95615b93133b6db0be8e80d4cb
data/README.md CHANGED
@@ -2,9 +2,17 @@
2
2
 
3
3
  Interact with any [IDRsolutions' Microservice Examples](https://github.com/idrsolutions/) using the IDRSolutions Ruby Client.
4
4
 
5
- The BuildVu Microservice Example is an open source project that allows you to convert PDFs using various softwares from [IDRSolutions](https://www.idrsolutions.com) as an online service.
5
+ The IDRsolutions Microservice Examples are open source projects that allows you to
6
+ convert PDFs using various softwares from [IDRSolutions](https://www.idrsolutions.com/) as an online service.
6
7
 
7
- IDRsolutions offer a free trial service for running these libraries with Ruby. You can find information at the following links for [JPedal](https://www.idrsolutions.com/jpedal/) and [BuildVU](https://www.idrsolutions.com/buildvu/).
8
+ JPedal Microservice Example - Convert pages to images
9
+
10
+ BuildVu Microservice Example - Convert PDFs to HTML or SVG
11
+
12
+ FormVu Microservice Example - Convert PDF Forms to HTML
13
+
14
+ IDR Solutions offer a free trial service for running these libraries with Ruby. You can
15
+ find information at the following links for [JPedal](https://www.idrsolutions.com/jpedal/), [BuildVu](https://www.idrsolutions.com/buildvu/), and [FormVu](https://www.idrsolutions.com/formvu/).
8
16
 
9
17
  -----
10
18
 
@@ -48,6 +56,10 @@ Full usage for connecting to BuildVu can be found [here](https://support.idrsolu
48
56
 
49
57
  Full usage for connecting to JPedal can be found [here](https://support.idrsolutions.com/jpedal/tutorials/cloud/).
50
58
 
59
+ ## FormVu: ##
60
+
61
+ Full usage for connecting to FormVu can be found [here](https://support.idrsolutions.com/formvu/tutorials/cloud/).
62
+
51
63
  -----
52
64
 
53
65
  # Who do I talk to? #
@@ -65,7 +77,7 @@ Short version: Don't be an awful person.
65
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).
66
78
 
67
79
  -----
68
- Copyright 2020 IDRsolutions
80
+ Copyright 2021 IDRsolutions
69
81
 
70
82
  Licensed under the Apache License, Version 2.0 (the "License");
71
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.3"
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.3
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-10 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: []