bin/docraptor in docraptor-cli-0.0.4 vs bin/docraptor in docraptor-cli-0.1.0
- old
+ new
@@ -51,10 +51,14 @@
opts.on("--async", "Create document asynchronously(10 min limit). Defaults to synchronous(1 min limit).") do |async|
options[:async] = async
end
+ opts.on("--callback_url url", "Set a callback URL to be notified upon success.") do |callback_url|
+ options[:callback_url] = callback_url
+ end
+
opts.on("-d", "--debug", "Enable debug logging.") do
options[:debug] = true
end
opts.on("--no-ignore-resource-errors",
@@ -233,9 +237,11 @@
document_type: options[:type],
prince_options: {},
async: options[:async],
ignore_resource_errors: options[:ignore_resource_errors],
}
+
+all_doc_attributes[:callback_url] = options[:callback_url] if options[:callback_url]
all_doc_attributes[:prince_options][:version] = options[:prince_version] if options[:prince_version]
all_doc_attributes[:prince_options][:javascript] = options[:prince_javascript] if options[:prince_javascript]
all_doc_attributes[:prince_options][:media] = options[:prince_media] if options[:prince_media]
all_doc_attributes[:prince_options][:baseurl] = options[:prince_baseurl] if options[:prince_baseurl]