[DRE-commits] [SCM] ruby-ronn.git branch, master, updated. upstream/0.7.3-6-g01acb30

Martin Ueding dev at martin-ueding.de
Thu Oct 6 10:44:11 UTC 2011


The following commit has been merged in the master branch:
commit f13d8d99498108b3cabf798bdee04d2a73ead958
Author: Martin Ueding <dev at martin-ueding.de>
Date:   Thu Oct 6 12:39:30 2011 +0200

    Revert application of patch on source

diff --git a/bin/ronn b/bin/ronn
index 37ae36f..5edb510 100755
--- a/bin/ronn
+++ b/bin/ronn
@@ -43,9 +43,25 @@ end
 ##
 # Libraries and LOAD_PATH shenanigans
 
-require 'rdiscount'
-require 'hpricot'
-require 'ronn'
+begin
+  require 'rdiscount'
+  require 'hpricot'
+  require 'ronn'
+rescue LoadError => boom
+  if boom.to_s =~ /ronn/
+    libdir = File.expand_path("../../lib", __FILE__).sub(%r|^#{Dir.pwd}/|, './')
+    if File.directory?(libdir) && !$:.include?(libdir)
+      warn "warn: #{boom}. adding #{libdir} to RUBYLIB ..."
+      $:.unshift libdir
+      retry
+    end
+  elsif !defined?(Gem)
+    warn "warn: #{boom}. loading rubygems ..."
+    require 'rubygems'
+    retry
+  end
+  abort boom.to_s
+end
 
 ##
 # Argument defaults

-- 
ruby-ronn.git



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