buildvu 3.0.0 → 3.0.1

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
- SHA256:
3
- metadata.gz: 9c8b9419f655c4e74c509c236a54ff38198811c66403799450eab9998018365d
4
- data.tar.gz: ac4f73d748d450cab1418c5cbc7f8cad199fa38d3c223dc9caefcdba17858790
2
+ SHA1:
3
+ metadata.gz: 596d7ac9d31dcd3fe525fdecae64df05845eb9cd
4
+ data.tar.gz: a230a0f3fa2ddeb9fda5a9e88386d56db6024043
5
5
  SHA512:
6
- metadata.gz: 32af19cd10bfab86a2ee869499921723f3d5888ffdbd7d25f80d9f8492e8d16817847638bbbe14c78a0afed2dbff9a3a1b232916f0a314ea523a589ebf609561
7
- data.tar.gz: 612e0e8f0ffe61f371428916df691ac37a715ce71e78ed0c21a1d4397fb2a18392d5d2edfd208cafba4f26ccd0e05cb91441e4f3ed3f6a80f1d9cd0b035c9d5f
6
+ metadata.gz: 11f28cb021db265b6a23fa53c13cc0ae7dcc70d50b0a74292c0b3df24110e0c335f03d6c60407e134dd1e40e8d94abb49fbd79259aeeba3a8c62680d59a720f1
7
+ data.tar.gz: 4025e542479fc1a612bf0929c8c5e49801838557305623c985314ed9855272c095e927016ae3412632ba2fb9ee03a99fed4491eba6d23d74671c1cbebfa3e095
data/README.md CHANGED
@@ -49,12 +49,12 @@ buildvu = BuildVu.new('localhost:8080/microservice-example')
49
49
  You can now convert files by calling the methods available. `convert()` will start the conversion process. For example to convert to html5:
50
50
  ```ruby
51
51
  # Convert the file with the input method specified
52
- results = buildvu.convert(input: BuildVu::UPLOAD)
52
+ results = buildvu.convert(input: BuildVu::UPLOAD, file: "path/to/file.pdf")
53
53
 
54
54
  # Return a URL where you can view the converted output in your web browser
55
55
  puts results['previewUrl']
56
56
  ```
57
- Alternatively, you can specify a url as the input source. This method does not require the prepare_file() method.
57
+ Alternatively, you can specify a url as the input source.
58
58
  ```ruby
59
59
  # Convert the file with the input method specified
60
60
  results = buildvu.convert(input: BuildVu::UPLOAD, url: 'http://link.to/file.pdf')
@@ -62,14 +62,13 @@ class BuildVu
62
62
 
63
63
  break if response['state'] == 'processed'
64
64
 
65
- break unless params['callbackUrl'].nil?
65
+ break unless params[:callbackUrl].nil?
66
66
 
67
67
  raise('Server error getting conversion status, see server logs for details') if response['state'] == 'error'
68
68
 
69
69
  raise('Failed: File took longer than ' + @convert_timeout.to_s + ' seconds to convert') if i == @convert_timeout
70
70
  end
71
71
 
72
- reset_files
73
72
  response
74
73
  end
75
74
 
@@ -97,19 +96,19 @@ class BuildVu
97
96
  # Upload file at given path to converter, return UUID if successful
98
97
  def upload(params)
99
98
 
100
- file_path = params.delete('file');
99
+ file_path = params.delete(:file);
101
100
  params[:file] = File.open(file_path, 'rb') if !file_path.nil?
102
101
 
103
102
  begin
104
103
  r = RestClient.post(@endpoint, params)
105
104
  rescue RestClient::ExceptionWithResponse => e
106
- raise('Error sending url:\n' + e.to_s)
105
+ raise("Error sending url:\n" + e.to_s)
107
106
  end
108
107
 
109
- r.code == 200 ? uuid = JSON.parse(r.body)['uuid'] : raise('Error uploading file:\n Server returned response\n' +
108
+ r.code == 200 ? uuid = JSON.parse(r.body)['uuid'] : raise("Error uploading file:\n Server returned response\n" +
110
109
  r.code)
111
110
 
112
- uuid.nil? ? raise('Error uploading file:\nServer returned null UUID') : uuid
111
+ uuid.nil? ? raise("Error uploading file:\nServer returned null UUID") : uuid
113
112
  end
114
113
 
115
114
  # Check conversion status
@@ -117,11 +116,11 @@ class BuildVu
117
116
  begin
118
117
  r = RestClient.get(@endpoint + '?uuid=' + uuid)
119
118
  rescue RestClient::ExceptionWithResponse => e
120
- raise('Error checking conversion status:\n' + e.to_s)
119
+ raise("Error checking conversion status:\n" + e.to_s)
121
120
  end
122
121
 
123
- r.code == 200 ? response = JSON.parse(r.body) : raise('Error checking conversion status:\n Server returned ' +
124
- 'response\n' + r.code)
122
+ r.code == 200 ? response = JSON.parse(r.body) : raise("Error checking conversion status:\n Server returned " +
123
+ "response\n" + r.code)
125
124
 
126
125
  response
127
126
  end
@@ -1,3 +1,3 @@
1
1
  class BuildVu
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildvu
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Foley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-14 00:00:00.000000000 Z
12
+ date: 2019-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -35,20 +35,20 @@ dependencies:
35
35
  name: json
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.1'
41
- - - "~>"
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '2.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ">="
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: '2.1'
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '2.1'
54
54
  description: "Convert PDF to HTML5 or SVG with Ruby, using the BuildVu Ruby Client
@@ -94,7 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 3.0.3
97
+ rubyforge_project:
98
+ rubygems_version: 2.6.14.1
98
99
  signing_key:
99
100
  specification_version: 4
100
101
  summary: Ruby API for IDRSolutions BuildVu Microservice