Git Product home page Git Product logo

docraptor-ruby's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docraptor-ruby's Issues

[Question] Webhook for async PDF generation

Hello. I was wondering if there are any plans to POST to a webhook when generating a PDF via async_doc. That would simplify a lot of error handling and looping on the client side.

callback url isn't trigged

I use the pretty straightforward code below with a paid and working account on Docraptor

require 'docraptor'

DocRaptor.configure do |dr|
  dr.username = 'xxxxxxxx'
  dr.debugging = true
end

options = {
  name: '56cb1f67ea32542ed2000000_csv.xls',
  document_type: 'xls',
  test: false,
  callback_url: '<valid call back url>',
  document_url:  '<valid amazon url>',
  prince_options: { version: '9.0', http_timeout: '60' }
}

docraptor = DocRaptor::DocApi.new

create_response = docraptor.create_async_doc(options)

The server is never called.... Pretty same code works with doc_raptor

What is wrong here?

Thanks

Add binary corruption test

It's easy for generated clients to return accidentally utf8 encoded data, which ends up corrupting PDF/XLS/XLSX files. Let's add a test to ensure this can never happen.

Broken on Rails 4.2.6

On Rails 4.2.6 (latest is 4.2.7), a NoMethodError is caused when receiving data after document creation. It looks to be related to rails/rails#25397 which is fixed in 4.2.7 and 5.0.0.

NoMethodError: undefined method `[]' for nil:NilClass
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/logger_silence.rb:23:in `level'
from /app/vendor/bundle/ruby/2.2.0/gems/ethon-0.9.0/lib/ethon/easy/operations.rb:30:in `perform'
from /app/vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/operations.rb:16:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/cacheable.rb:18:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/block_connection.rb:31:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/stubbable.rb:25:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/before.rb:26:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/docraptor-0.3.0/lib/docraptor/api_client.rb:37:in `call_api'
from /app/vendor/bundle/ruby/2.2.0/gems/docraptor-0.3.0/lib/docraptor/api/doc_api.rb:118:in `create_doc_with_http_info'
from /app/vendor/bundle/ruby/2.2.0/gems/docraptor-0.3.0/lib/docraptor/api/doc_api.rb:77:in `create_doc'
from (irb):7
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/console.rb:110:in `start'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/console.rb:9:in `start'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:68:in `console'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /app/bin/rails:8:in `require’

Incompatibility issues with Ruby 3

We're using ruby 3.0.1, and this gem fails to work because of the following errors:

docraptor-1.4.0/lib/docraptor/configuration.rb:178:in `base_url': undefined method `encode' for URI:Module (NoMethodError)
docraptor-1.4.0/lib/docraptor/api_client.rb:269:in `build_request_url': undefined method `encode' for URI:Module (NoMethodError)

URI.encode has been removed in ruby 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.