pandurang90/cloudconvert — pull request #7 by olibob (2014-05-23 23:26:36+00:00)
Title: rewrite using faraday middleware

Hi,

I have re-written the Conversion class using faraday_middleware. I think it's easier this way.

A few examples:

```
#!/usr/bin/env ruby

require 'cloudconvert'

Cloudconvert.configure do |config|
# config.api_key = 'your api key'
end

# Example:
#
# Convert remote web hosted document from markdown to pdf
# with: - email confirmation
# - dropbox delivery

conv = Cloudconvert::Conversion.new('md', 'pdf')
conv.newProcess

conversion_options = {
file: 'http://example.com/file.md',
filename: 'file.md',
email: '1',
output: 'dropbox'
}
conv.conversion_payload(conversion_options)
conv.remoteFile

step = conv.status['step']

while !(step =~ /error|finished/)
step = conv.status['step']
puts step
sleep 2
end

puts "File conerted successfully, url:'http:#{conv.status['output']['url']}'"

# Example:
#
# - get current conversion types

# conv = Cloudconvert::Conversion.new('md', "pdf")
puts conv.current_conversion_types

# - get all conversion types
# puts "\n\n**********************\n\n"
# puts conv.conversion_types

# - get mp3 conversion types
puts "\n\n**********************\n\n"
puts conv.conversion_types('mp3')

```

Please, let me know if you're interested in these changes.
I'll try to add AWS S3 support as well.