[DRE-commits] [SCM] ruby-uglifier.git branch, master, updated. debian/1.2.5-1-2-g67eb79a

Antonio Terceiro terceiro at softwarelivre.org
Fri Jul 13 12:16:38 UTC 2012


The following commit has been merged in the master branch:
commit 26f5cbdf3a129a26faa9d2ad8f8a7ecf782a3569
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Fri Jul 13 08:49:14 2012 -0300

    Run tests against local JavaScript files

diff --git a/debian/changelog b/debian/changelog
index 62b595b..c895796 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ruby-uglifier (1.2.5-2) unstable; urgency=low
+
+  * When running tests, use the local JavaScript files instead of the ones
+    that would be installed to /usr/share when the package is installed
+    (Closes: #680835).
+
+ -- Antonio Terceiro <terceiro at debian.org>  Fri, 13 Jul 2012 08:48:14 -0300
+
 ruby-uglifier (1.2.5-1) unstable; urgency=low
 
   * Initial release.
diff --git a/debian/patches/change-javascript-files-path.patch b/debian/patches/change-javascript-files-path.patch
index 259411a..8e24875 100644
--- a/debian/patches/change-javascript-files-path.patch
+++ b/debian/patches/change-javascript-files-path.patch
@@ -2,16 +2,25 @@ Description: Point to Javascript files at /usr/share
  This patch is Debian-specific.
 Author: Antonio Terceiro <terceiro at debian.org>
 
---- ruby-uglifier-1.2.5.orig/lib/uglifier.rb
-+++ ruby-uglifier-1.2.5/lib/uglifier.rb
-@@ -30,8 +30,8 @@ class Uglifier
+Index: ruby-uglifier/lib/uglifier.rb
+===================================================================
+--- ruby-uglifier.orig/lib/uglifier.rb	2012-06-28 09:14:57.000000000 -0300
++++ ruby-uglifier/lib/uglifier.rb	2012-07-13 08:47:22.545607566 -0300
+@@ -30,8 +30,15 @@
      }
    }
  
 -  SourcePath = File.expand_path("../uglify.js", __FILE__)
 -  ES5FallbackPath = File.expand_path("../es5.js", __FILE__)
-+  SourcePath = "/usr/share/javascript/ruby-uglifier/uglify.js"
-+  ES5FallbackPath = "/usr/share/javascript/ruby-uglifier/es5.js"
++  def self.find_asset(filename)
++    [
++      File.expand_path("../" + filename, __FILE__),
++      File.join("/usr/share/javascript/ruby-uglifier", filename)
++    ].find { |f| File.exists?(f) }
++  end
++
++  SourcePath = find_asset("uglify.js")
++  ES5FallbackPath = find_asset("es5.js")
  
    # Minifies JavaScript code using implicit context.
    #

-- 
ruby-uglifier.git



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