[DRE-commits] [ruby-rabl] 01/01: Fix FTBFS caused by ruby-bson changes

zeha at debian.org zeha at debian.org
Sun Feb 5 17:44:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch master
in repository ruby-rabl.

commit b3f38ec7af2521c1c2797ca185f836056791125d
Author: Christian Hofstaedtler <zeha at debian.org>
Date:   Sun Feb 5 17:38:04 2017 +0000

    Fix FTBFS caused by ruby-bson changes
    
    Patch from Gilles Filippini <pini at debian.org>, thanks.
---
 debian/changelog                        | 14 +++++++++++--
 debian/patches/def-bson-serialize.patch | 36 +++++++++++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 3 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0bc7aef..2f4fa46 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ruby-rabl (0.13.0-2) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Gilles Filippini ]
+  * def-bson-serialize.patch: reintroduce BSON.serialize method dropped
+    from ruby-bson since release 2.0.0 (Closes: #849315)
+
+ -- Christian Hofstaedtler <zeha at debian.org>  Sun, 05 Feb 2017 17:37:31 +0000
+
 ruby-rabl (0.13.0-1) unstable; urgency=medium
 
   * Imported Upstream version 0.13.0
@@ -22,7 +32,7 @@ ruby-rabl (0.12.0-1) unstable; urgency=medium
 ruby-rabl (0.11.4-2) unstable; urgency=medium
 
   * Team upload.
-  * Re-upload to unstable. 
+  * Re-upload to unstable.
 
  -- Pirate Praveen <praveen at debian.org>  Mon, 27 Apr 2015 18:51:10 +0530
 
@@ -30,7 +40,7 @@ ruby-rabl (0.11.4-1) experimental; urgency=medium
 
   * Team upload.
   * New upstream release (needed to update gon).
-  * Bump standards version to 3.9.6 (no changes). 
+  * Bump standards version to 3.9.6 (no changes).
 
  -- Pirate Praveen <praveen at debian.org>  Wed, 19 Nov 2014 01:28:48 +0530
 
diff --git a/debian/patches/def-bson-serialize.patch b/debian/patches/def-bson-serialize.patch
new file mode 100644
index 0000000..43ea5cb
--- /dev/null
+++ b/debian/patches/def-bson-serialize.patch
@@ -0,0 +1,36 @@
+Description: From ruby-bson upstream changelog [1]:
+ 2.0.0
+ Backwards Incompatible Changes
+ ...
+ BSON.serialize is no longer the entry point to serialize a BSON
+ document into its raw bytes.
+ For Ruby runtimes that support ordered hashes, you may simply call
+ `to_bson` on the hash instance (Alternatively a `BSON::Document` is
+ also a hash:
+  { key: "value" }.to_bson
+  BSON::Document[:key, "value"].to_bson
+ For Ruby runtimes that do not support ordered hashes, then you must
+ instantiate an instance of a `BSON::Document` (which is a subclass of
+ hash) and call `to_bson` on that, since the BSON specification
+ guarantees order of the fields:
+  BSON::Document[:key, "value"].to_bson
+ .
+ [1] https://github.com/mongodb/bson-ruby/blob/master/CHANGELOG.md
+ .
+ This patch re-introduces BSON.serialize.
+Author: Gilles Filippini <pini at debian.org>
+Bug-Debian: https://bugs.debian.org/849315
+Index: ruby-rabl-0.13.0/lib/rabl/configuration.rb
+===================================================================
+--- ruby-rabl-0.13.0.orig/lib/rabl/configuration.rb
++++ ruby-rabl-0.13.0/lib/rabl/configuration.rb
+@@ -7,6 +7,9 @@ end
+ # We load the bson library if it is available.
+ begin
+   require 'bson'
++  def BSON.serialize data
++    data.to_bson
++  end
+   rescue LoadError
+ end
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..24ba155
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+def-bson-serialize.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rabl.git



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