[DRE-commits] [SCM] thin.git branch, master, updated. debian/1.3.1-1-4-g302e0e8

Ryan Niebur ryanryan52 at gmail.com
Sat Jun 16 09:04:25 UTC 2012


The following commit has been merged in the master branch:
commit 302e0e89ee8d2e25fd09de4410b8ef4c09bc1f6e
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date:   Sat Jun 16 02:02:14 2012 -0700

    Fix debian/gen_init.rb to use FileUtils for supporting Ruby 1.9

diff --git a/debian/changelog b/debian/changelog
index a7d91e2..5cd995f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ thin (1.3.1-2) UNRELEASED; urgency=low
 
   * Add patch to pass format string as %s to allow for compiling with
     hardnening options (Closes: #676211)
+  * Fix debian/gen_init.rb to use FileUtils for supporting Ruby 1.9
 
- -- Ryan Niebur <ryan at debian.org>  Sat, 16 Jun 2012 02:00:23 -0700
+ -- Ryan Niebur <ryan at debian.org>  Sat, 16 Jun 2012 02:01:40 -0700
 
 thin (1.3.1-1.1) unstable; urgency=high
 
diff --git a/debian/gen_init.rb b/debian/gen_init.rb
index 9c3905a..4158a25 100644
--- a/debian/gen_init.rb
+++ b/debian/gen_init.rb
@@ -2,7 +2,13 @@
 
 require 'erb'
 require 'gem2deb/dh_ruby'
-require 'ftools'
+if RUBY_VERSION.match(/1.8/)
+  require 'ftools'
+  ftools_klass = File
+else
+  require 'fileutils'
+  ftools_klass = FileUtils
+end
 class Command
   def self.script
     "/usr/bin/thin"
@@ -12,7 +18,7 @@ INITD_PATH="/etc/init.d/thin"
 rubies = {}
 Gem2Deb::DhRuby::SUPPORTED_RUBY_VERSIONS.each{|x,y| x = x.sub(/^ruby/, ""); rubies[x] = y;}
 rubies.keys.each do |x|
-  File.makedirs(File.join("debian", "thin", "etc", "thin" + x))
+  ftools_klass.makedirs(File.join("debian", "thin", "etc", "thin" + x))
 end
 File.open(File.dirname(__FILE__) + '/thin.init', 'w') do |f|
   f << ERB.new(File.read("lib/thin/controllers/service.sh.erb")).result(binding)

-- 
thin.git



More information about the Pkg-ruby-extras-commits mailing list