[DRE-commits] [SCM] ruby-cookiejar.git branch, master, updated. upstream/0.3.0-9-g7c9d3e1

Cédric Boutillier boutil at debian.org
Thu Jun 6 17:20:34 UTC 2013


The following commit has been merged in the master branch:
commit f42e96818c5dc0ac5dfada6d96dcd692e06f53a8
Author: Cédric Boutillier <boutil at debian.org>
Date:   Thu Jun 6 19:19:19 2013 +0200

    split patch, use :create_additions to fix tests

diff --git a/debian/patches/fix-test-failures-remove-rubygems.patch b/debian/patches/fix-test-failures.patch
similarity index 58%
rename from debian/patches/fix-test-failures-remove-rubygems.patch
rename to debian/patches/fix-test-failures.patch
index b3cf4bd..cadf90f 100644
--- a/debian/patches/fix-test-failures-remove-rubygems.patch
+++ b/debian/patches/fix-test-failures.patch
@@ -1,56 +1,29 @@
+Description: use :create_additions to force creation
+ of object from JSON with ruby-json post CVE-2013-0269
+Forwarded: https://github.com/dwaite/cookiejar/pull/7
+Origin: vendor
+Reviewed-by: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2013-06-06
+
 --- a/test/jar_test.rb
 +++ b/test/jar_test.rb
-@@ -1,7 +1,6 @@
- require 'cookiejar'
- require 'yaml'
--require 'rubygems'
--
-+#require 'rubygems'
- include CookieJar
- 
- describe Jar do
-@@ -214,7 +213,8 @@
+@@ -214,7 +213,7 @@
        
        it "should automatically deserialize to a jar" do
          json = "{\"json_class\":\"CookieJar::Jar\",\"cookies\":[{\"name\":\"foo\",\"value\":\"bar\",\"domain\":\"localhost.local\",\"path\":\"\\/\",\"created_at\":\"2009-09-11 12:51:03 -0600\",\"expiry\":\"2028-11-01 12:00:00 GMT\",\"secure\":true}]}" 
 -        jar = JSON.parse json
-+        hash = JSON.parse json
-+        jar = Jar.json_create hash
++        jar = JSON.parse json, :create_additions => true
          jar.get_cookies('https://localhost/').should have(1).items  
        end
      end
 --- a/test/cookie_test.rb
 +++ b/test/cookie_test.rb
-@@ -1,5 +1,5 @@
- require 'cookiejar'
--require 'rubygems'
-+#require 'rubygems'
- 
- include CookieJar
- 
-@@ -163,7 +163,8 @@
+@@ -163,7 +163,7 @@
        end
        it "should automatically deserialize to a cookie" do
          json = "{\"json_class\":\"CookieJar::Cookie\",\"name\":\"foo\",\"value\":\"bar\",\"domain\":\"localhost.local\",\"path\":\"\\/\",\"created_at\":\"2009-09-11 12:51:03 -0600\",\"expiry\":\"2009-09-11 19:10:00 -0600\",\"secure\":true}" 
 -        c = JSON.parse json
-+        hash = JSON.parse json
-+        c = Cookie.json_create hash
++        c = JSON.parse json, :create_additions => true
          c.should be_a Cookie
          CookieValidation.validate_cookie 'https://localhost/', c
        end
---- a/test/cookie_validation_test.rb
-+++ b/test/cookie_validation_test.rb
-@@ -1,5 +1,5 @@
- require 'cookiejar'
--require 'rubygems'
-+#require 'rubygems'
- 
- include CookieJar
- describe CookieValidation do
-@@ -236,4 +236,4 @@
-       end
-     end
-   end
--end
-\ No newline at end of file
-+end
diff --git a/debian/patches/remove-rubygems.patch b/debian/patches/remove-rubygems.patch
new file mode 100644
index 0000000..5cebffc
--- /dev/null
+++ b/debian/patches/remove-rubygems.patch
@@ -0,0 +1,40 @@
+Description: remove usage of rubygems in tests
+Origin: vendor
+Forwarded: no
+Last-Update: 2013-06-06
+
+--- a/test/cookie_test.rb
++++ b/test/cookie_test.rb
+@@ -1,5 +1,5 @@
+ require 'cookiejar'
+-require 'rubygems'
++#require 'rubygems'
+ 
+ include CookieJar
+ 
+--- a/test/cookie_validation_test.rb
++++ b/test/cookie_validation_test.rb
+@@ -1,5 +1,5 @@
+ require 'cookiejar'
+-require 'rubygems'
++#require 'rubygems'
+ 
+ include CookieJar
+ describe CookieValidation do
+@@ -236,4 +236,4 @@
+       end
+     end
+   end
+-end
+\ No newline at end of file
++end
+--- a/test/jar_test.rb
++++ b/test/jar_test.rb
+@@ -1,6 +1,6 @@
+ require 'cookiejar'
+ require 'yaml'
+-require 'rubygems'
++#require 'rubygems'
+ 
+ include CookieJar
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 3d9289c..f3efaba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-fix-test-failures-remove-rubygems.patch
+fix-test-failures.patch
+remove-rubygems.patch

-- 
ruby-cookiejar.git



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