cloudconvert-ruby 0.1.9 → 0.2.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
  SHA1:
3
- metadata.gz: f55415d6ade196eae24ad851254e7590fac23fb5
4
- data.tar.gz: 92a6bba134f98c32af7d6ebaaa7ed360226240d9
3
+ metadata.gz: 4956d488445f5186650ddf1fba2ce3abf4add1b6
4
+ data.tar.gz: 8f3bb881384b4c12c93a5243055d70916d8e37aa
5
5
  SHA512:
6
- metadata.gz: 45420245a687159591c3f6e72faa7c9d88dd39edbae4f7e9066ae685f701106e30eb9944b954b51ec19223b6bc4d7dc50eeb0218c70b05fbfb9516f4bc085256
7
- data.tar.gz: 8881389fcfb8d6588b130ed22ea2d0aa046c2febe022005d358d896392af2fe960b52c267300ea7acc6c282fa0d3f1ca1593cc7acbe0be65819ea064958944c1
6
+ metadata.gz: 450b2ca56fa76928fd655a82383b80a99a08676230558a2a526d80f74611b5f72f1178f96a4d251bab9dc48de1f05b70c76316221b023ac860de49dca455d3e8
7
+ data.tar.gz: 2cc66c12ed40544425a507a40a9cb778fea989c3fa304005d62301080108019d938741e5d8c5ade73b2463522c432df8e54d111543c83eb1f4e3579b7050f320
@@ -42,27 +42,14 @@ module CloudConvert
42
42
  def convert(opts)
43
43
  raise CloudConvert::InvalidStep if @step == :awaiting_creation
44
44
  url = process_url()
45
- if opts[:file].respond_to?("read")
46
- file_to_upload = opts[:file]
47
- opts.delete(:file)
48
- end
45
+ multi = opts[:file].respond_to?("read")
49
46
  response = send_request(http_method: :post,
50
47
  url: url,
51
48
  params: opts,
52
- multi: false) do |response|
49
+ multi: multi) do |response|
53
50
  response.parsed_response[:success] = true
54
51
  create_parsed_response(:conversion_response, response.parsed_response)
55
52
  @step = @conversion_response[:step].to_sym
56
-
57
- if(file_to_upload)
58
- send_request(http_method: :post,
59
- url: "#{CloudConvert::PROTOCOL}:#{@conversion_response[:upload][:url]}",
60
- params: {
61
- "file": file_to_upload
62
- },
63
- multi: true)
64
- end
65
-
66
53
  end
67
54
  return convert_response response
68
55
  end
@@ -1,10 +1,10 @@
1
1
  module CloudConvert
2
2
  module VERSION_VALUES #:nodoc:
3
3
  MAJOR = '0'
4
- MINOR = '1'
5
- TINY = '9'
4
+ MINOR = '2'
5
+ TINY = '0'
6
6
  BETA = nil # Time.now.to_i.to_s
7
- end
7
+ end
8
8
 
9
9
  VERSION= [VERSION_VALUES::MAJOR, VERSION_VALUES::MINOR, VERSION_VALUES::TINY, VERSION_VALUES::BETA].compact * '.'
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudconvert-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edwin Velasquez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2018-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.5.1
172
+ rubygems_version: 2.6.14
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Ruby wrapper for the Cloud Convert API