buildvu 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7709b66d0f68e6574c3c74be9163a4ff9713b76e830905c8eb9078a8a6d8c9f1
4
- data.tar.gz: ebe24a14074fbc26a98824a169674edf08154e468fc029ffd7a1b19890eb1bd3
3
+ metadata.gz: e3c5df6b473fb97ec2c0e6fd2cb78ef9d2c648b0b1f8390a7bf8225078c580e6
4
+ data.tar.gz: 9ce1d5000ae88638b1c959184f37aa013805db2e77af9e9c15da51dbb63dbb37
5
5
  SHA512:
6
- metadata.gz: 77100ef564a08275aa19d78699eb2bca80929b6fd2c5c375bf983079fefe0200cb7baedcc1f7517c8337ff09e338d0b50a8ae44e5b5753c636dc207bbb3a55e9
7
- data.tar.gz: 942e645c08032259065c69bf1ed94651cc2081e41fc499b345265ee546cb9591159441d5e5804a06e3c4b69438b285d5e50c186f15b64547dea9fa4da9f0288f
6
+ metadata.gz: 2dff1ee31214302bed44295ba73eae93aadfccd6003c148c34d0982b64701f92dff211f3e445f1ab5809e18d9ead4472b90142d04e5e91613c562cd4432f38bc
7
+ data.tar.gz: a41b29b903574ae283630ab532b5d3fac4b21e3835ba33374b699b406eb1e342dec9fbda4cff45bd0f13f6214958a4595622ce9321b34ccec5ac60cac8ed1e72
@@ -3,7 +3,7 @@ require 'buildvu'
3
3
  buildvu = BuildVu.new'localhost:8080/microservice-example'
4
4
 
5
5
  # convert returns a URL (string) where you can view the converted output.
6
- output_url = buildvu.convert 'C:/test/general/awjune2003.pdf', 'C:\\test\\out\\'
6
+ output_url = buildvu.convert '/path/to/input.pdf'
7
7
  puts 'Converted: ' + output_url
8
8
 
9
9
  # You can also specify a directory to download the converted output to:
@@ -58,7 +58,7 @@ class BuildVu
58
58
 
59
59
  break if response['state'] == 'processed'
60
60
 
61
- raise('Error checking conversion status') if response['state'] == 'error'
61
+ raise('Server error getting conversion status, see server logs for details') if response['state'] == 'error'
62
62
 
63
63
  raise('Failed: File took longer than ' + @convert_timeout.to_s + ' seconds to convert') if i == @convert_timeout
64
64
  end
@@ -86,9 +86,10 @@ class BuildVu
86
86
  raise('Error uploading file:\n' + e.message)
87
87
  end
88
88
 
89
- r.code == 200 ? uuid = JSON.parse(r.body)['uuid'] : raise('Error uploading file')
89
+ r.code == 200 ? uuid = JSON.parse(r.body)['uuid'] : raise('Error uploading file:\n Server returned response\n' +
90
+ r.code)
90
91
 
91
- uuid
92
+ uuid.nil? ? raise('Error uploading file:\nServer returned null UUID') : uuid
92
93
  end
93
94
 
94
95
  # Check conversion status
@@ -99,7 +100,8 @@ class BuildVu
99
100
  raise('Error checking conversion status:\n' + e.to_s)
100
101
  end
101
102
 
102
- r.code == 200 ? response = JSON.parse(r.body) : raise('Error checking conversion status')
103
+ r.code == 200 ? response = JSON.parse(r.body) : raise('Error checking conversion status:\n Server returned ' +
104
+ 'response\n' + r.code)
103
105
 
104
106
  response
105
107
  end
@@ -1,3 +1,3 @@
1
1
  class BuildVu
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildvu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - IDRsolutions
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-10 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler