tsboh / origami-pdf

Automatically exported from code.google.com/p/origami-pdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

pdf2ruby: Ftools is deprecated #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load a ruby 1.9 >= environment
2. run pdf2ruby

What is the expected output? What do you see instead?
A ruby script using origami that will re-generate the pdf, instead:
rubygems/custom_require.rb:36:in `require': no such file to load -- ftools 
(LoadError)

What version of the product are you using? On what operating system?
origami 1.2.3, ubuntu linux, ruby-1.9.2-p0 via rvm

Please provide any additional information below.
The following patch resolves this issue and another bug that cropped up

$ diff -u origami-1.2.3/bin/pdf2ruby origami-1.2.3/bin/pdf2ruby-20111220 
--- origami-1.2.3/bin/pdf2ruby  2011-12-20 13:47:34.664618338 -0800
+++ origami-1.2.3/bin/pdf2ruby-20111220 2011-12-20 13:50:14.543605527 -0800
@@ -26,11 +26,11 @@
 =end

 require 'optparse'
-require 'ftools'
+require 'fileutils'
 begin
   require 'origami'
-rescue LoadError
   ORIGAMIDIR = "#{File.dirname(__FILE__)}/../lib"
+rescue LoadError
   $: << ORIGAMIDIR
   require 'origami'
 end

Original issue reported on code.google.com by Dennison...@gmail.com on 20 Dec 2011 at 9:51

GoogleCodeExporter commented 8 years ago
I pushed the change in the repository. It will be integrated in the next gem 
release.
Also fixed some deprecation warnings on Ruby 1.9.

Thank you for reporting this issue.

Regards,
Guillaume

Original comment by guilla...@security-labs.org on 6 Apr 2012 at 4:41