[DRE-commits] r5949 - in trunk/libjson-ruby/debian: . patches
Laurent Arnoud
spk-guest at alioth.debian.org
Fri Oct 22 20:16:23 UTC 2010
Author: spk-guest
Date: 2010-10-22 20:16:22 +0000 (Fri, 22 Oct 2010)
New Revision: 5949
Added:
trunk/libjson-ruby/debian/patches/03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch
Modified:
trunk/libjson-ruby/debian/changelog
trunk/libjson-ruby/debian/patches/series
Log:
Add patch for prettify_json.rb (Closes: #561839)
Signed-off-by: Laurent Arnoud <laurent at spkdev.net>
Modified: trunk/libjson-ruby/debian/changelog
===================================================================
--- trunk/libjson-ruby/debian/changelog 2010-10-21 07:48:19 UTC (rev 5948)
+++ trunk/libjson-ruby/debian/changelog 2010-10-22 20:16:22 UTC (rev 5949)
@@ -3,6 +3,7 @@
* New upstream release
* Switch to dpkg-source 3.0 (quilt) format
* Debian Policy 3.9.1
+ * Add patch for prettify_json.rb (Closes: #561839)
-- Laurent Arnoud <laurent at spkdev.net> Fri, 08 Oct 2010 21:47:50 +0200
Added: trunk/libjson-ruby/debian/patches/03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch
===================================================================
--- trunk/libjson-ruby/debian/patches/03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch (rev 0)
+++ trunk/libjson-ruby/debian/patches/03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch 2010-10-22 20:16:22 UTC (rev 5949)
@@ -0,0 +1,51 @@
+From 0d8c191b4fab5d87f71f3d9e9b2b1269a8e618b8 Mon Sep 17 00:00:00 2001
+From: Laurent Arnoud <laurent at spkdev.net>
+Date: Fri, 8 Oct 2010 23:59:16 +0200
+Forwarded: yes (http://github.com/flori/json/pull/48)
+Subject: [PATCH] bin/prettify_json.rb: Set max_nesting and create_additions to false like edit_json
+
+it refers to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561839
+
+Signed-off-by: Laurent Arnoud <laurent at spkdev.net>
+---
+ bin/prettify_json.rb | 21 ++++++++++++---------
+ 1 files changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/bin/prettify_json.rb b/bin/prettify_json.rb
+index 5e1f806..943546f 100755
+--- a/bin/prettify_json.rb
++++ b/bin/prettify_json.rb
+@@ -53,18 +53,21 @@ EOT
+ end
+
+ filename = nil
+-json = JSON[
+- if args.empty?
+- STDIN.read
+- else
+- File.read filename = args.first
+- end
+-]
++str = nil
++json_opts = {:max_nesting => false, :create_additions => false}
++
++if args.empty?
++ str = STDIN.read
++else
++ str = File.read(filename = args.first)
++end
++
++json = JSON[str, json_opts]
+
+ output = if opts['s']
+- JSON.fast_generate json
++ JSON.fast_generate json, json_opts
+ else # default is -l
+- JSON.pretty_generate json
++ JSON.pretty_generate json, json_opts
+ end
+
+ if opts['i'] && filename
+--
+1.7.1
+
Modified: trunk/libjson-ruby/debian/patches/series
===================================================================
--- trunk/libjson-ruby/debian/patches/series 2010-10-21 07:48:19 UTC (rev 5948)
+++ trunk/libjson-ruby/debian/patches/series 2010-10-22 20:16:22 UTC (rev 5949)
@@ -1,2 +1,3 @@
00-icon-path.patch
02-fix-fuzz.rb-shebang.patch
+03-bin-prettify_json.rb-Set-max_nesting-and-create_addi.patch
More information about the Pkg-ruby-extras-commits
mailing list