Blame nodejs-underscore-dot-string-2.3.1-Ensure-correct-encoding.patch

78291f7
From ed512e2f221362f8af932321c58c5b4c0b0bcf1d Mon Sep 17 00:00:00 2001
78291f7
From: Jamie Nguyen <j@jamielinux.com>
78291f7
Date: Sat, 22 Jun 2013 17:39:12 +0100
78291f7
Subject: [PATCH] Ensure correct encoding is used for 'rake build'
78291f7
78291f7
---
78291f7
 Rakefile | 4 ++--
78291f7
 1 file changed, 2 insertions(+), 2 deletions(-)
78291f7
78291f7
diff --git a/Rakefile b/Rakefile
78291f7
index 587c81b..2cd9eed 100644
78291f7
--- a/Rakefile
78291f7
+++ b/Rakefile
78291f7
@@ -4,7 +4,7 @@ task default: :test
78291f7
 desc 'Use UglifyJS to compress Underscore.string'
78291f7
 task :build do
78291f7
   require 'uglifier'
78291f7
-  source = File.read('lib/underscore.string.js')
78291f7
+  source = File.read('lib/underscore.string.js', :encoding => 'utf-8')
78291f7
   compressed = Uglifier.compile(source, copyright: false)
78291f7
   File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed }
78291f7
   compression_rate = compressed.length.to_f/source.length
78291f7
@@ -20,4 +20,4 @@ task :test do
78291f7
   result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"}
78291f7
 
78291f7
   exit(result1 && result2 ? 0 : 1)
78291f7
-end
78291f7
\ No newline at end of file
78291f7
+end
78291f7
-- 
78291f7
1.8.2.1
78291f7