[DRE-commits] [SCM] ruby-webmock.git branch, master, updated. upstream/1.11.0-13-ga04edb8

Cédric Boutillier boutil at debian.org
Fri May 24 22:08:20 UTC 2013


The following commit has been merged in the master branch:
commit 02aad002b7e759c5997b8de77e441b04d31cfa2d
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sat May 25 00:07:31 2013 +0200

    update/add some patches

diff --git a/debian/patches/deactivate_tests_with_network.patch b/debian/patches/deactivate_tests_with_network.patch
new file mode 100644
index 0000000..9ad8867
--- /dev/null
+++ b/debian/patches/deactivate_tests_with_network.patch
@@ -0,0 +1,25 @@
+Description: deactive tests requiring network access
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2013-05-24
+
+--- a/spec/acceptance/excon/excon_spec.rb
++++ b/spec/acceptance/excon/excon_spec.rb
+@@ -17,7 +17,7 @@
+   end
+ 
+   context "with response_block" do
+-    it "should support excon response_block for real requests" do
++    xit "should support excon response_block for real requests" do
+       a = []
+       WebMock.allow_net_connect!
+       r = Excon.new('http://httpstat.us/200').get(:response_block => lambda {|e, remaining, total| a << e}, :chunk_size => 1)
+@@ -33,7 +33,7 @@
+       r.body.should == ""
+     end
+ 
+-    it "should invoke callbacks with response body even if a real request is made" do
++    xit "should invoke callbacks with response body even if a real request is made" do
+       a = []
+       WebMock.allow_net_connect!
+       response = nil
diff --git a/debian/patches/port_to_minitest5.patch b/debian/patches/port_to_minitest5.patch
new file mode 100644
index 0000000..5176c3f
--- /dev/null
+++ b/debian/patches/port_to_minitest5.patch
@@ -0,0 +1,75 @@
+Description: Port to Minitest 5.0
+From: Tim Kurvers <tim at moonsphere.net>
+Reviewed-by: Cédric Boutillier <boutil at debian.org>
+Origin: https://github.com/bblimke/webmock/pull/281
+Date: 2013-05-24
+
+---
+ lib/webmock/minitest.rb  | 4 ++--
+ minitest/test_helper.rb  | 9 ++++++---
+ minitest/test_webmock.rb | 3 +--
+ 3 files changed, 9 insertions(+), 7 deletions(-)
+
+--- a/lib/webmock/minitest.rb
++++ b/lib/webmock/minitest.rb
+@@ -1,7 +1,7 @@
+-require 'minitest/unit'
++require 'minitest/test'
+ require 'webmock'
+ 
+-MiniTest::Unit::TestCase.class_eval do
++MiniTest::Test.class_eval do
+   include WebMock::API
+ 
+   alias_method :teardown_without_webmock, :teardown
+@@ -14,7 +14,7 @@
+   [:assert_request_requested, :assert_request_not_requested].each do |name|
+     alias_method :"#{name}_without_assertions_count", name
+     define_method :"#{name}_with_assertions_count" do |*args|
+-      self._assertions += 1
++      self.assertions += 1
+       send :"#{name}_without_assertions_count", *args
+     end
+     alias_method name, :"#{name}_with_assertions_count"
+--- a/minitest/test_helper.rb
++++ b/minitest/test_helper.rb
+@@ -9,7 +9,7 @@
+ require 'minitest/autorun'
+ require 'webmock/minitest'
+ 
+-class MiniTest::Unit::TestCase
++class MiniTest::Test
+   def assert_raise(*exp, &block)
+     assert_raises(*exp, &block)
+   end
+--- a/minitest/test_webmock.rb
++++ b/minitest/test_webmock.rb
+@@ -1,7 +1,6 @@
+ require File.expand_path(File.dirname(__FILE__) + '/test_helper')
+ require File.expand_path(File.dirname(__FILE__) + '/../test/shared_test')
+ 
+-class MiniTestWebMock < MiniTest::Unit::TestCase
++class MiniTestWebMock < MiniTest::Test
+   include SharedTest
+-
+ end
+--- a/minitest/webmock_spec.rb
++++ b/minitest/webmock_spec.rb
+@@ -9,14 +9,14 @@
+     end
+ 
+     it "should update assertions count" do
+-      assert_equal 0, _assertions
++      assert_equal 0, assertions
+       http_request(:get, "http://www.example.com/")
+ 
+       assert_requested(@stub_http)
+-      assert_equal 2, _assertions
++      assert_equal 2, assertions
+ 
+       assert_not_requested(:post, "http://www.example.com")
+-      assert_equal 4, _assertions
++      assert_equal 4, assertions
+     end
+ 
+     it "should raise error on non stubbed request" do
diff --git a/debian/patches/remove-rubygems-curb-version-check.patch b/debian/patches/remove-rubygems-curb-version-check.patch
index 163b92a..8bd6b57 100644
--- a/debian/patches/remove-rubygems-curb-version-check.patch
+++ b/debian/patches/remove-rubygems-curb-version-check.patch
@@ -10,12 +10,3 @@
  
    module WebMock
      module HttpLibAdapters
---- a/spec/spec_helper.rb
-+++ b/spec/spec_helper.rb
-@@ -1,4 +1,5 @@
--require 'rubygems'
-+# all dependencies are covered in debian/control
-+# require 'rubygems'
- require 'httpclient'
- unless RUBY_PLATFORM =~ /java/
-   require 'curb'
diff --git a/debian/patches/remove-rubygems-in-tests.patch b/debian/patches/remove-rubygems-in-tests.patch
new file mode 100644
index 0000000..d023e05
--- /dev/null
+++ b/debian/patches/remove-rubygems-in-tests.patch
@@ -0,0 +1,78 @@
+Description: remove usage of rubygems in tests
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: no
+Last-Update: 2013-05-24
+
+--- a/minitest/test_helper.rb
++++ b/minitest/test_helper.rb
+@@ -1,11 +1,11 @@
+-require 'rubygems'
++#require 'rubygems'
+ 
+-$LOAD_PATH.unshift(File.dirname(__FILE__))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
++#$LOAD_PATH.unshift(File.dirname(__FILE__))
++#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+ 
+ require File.expand_path(File.dirname(__FILE__) + '/../test/http_request')
+ 
+-gem "minitest"
++#gem "minitest"
+ require 'minitest/autorun'
+ require 'webmock/minitest'
+ 
+@@ -26,4 +26,4 @@
+    def assert_fail(message, &block)
+      assert_raise_with_message(MiniTest::Assertion, message, &block)
+    end
+-end
+\ No newline at end of file
++end
+--- a/test/test_helper.rb
++++ b/test/test_helper.rb
+@@ -1,7 +1,7 @@
+-require 'rubygems'
++#require 'rubygems'
+ 
+-$LOAD_PATH.unshift(File.dirname(__FILE__))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
++#$LOAD_PATH.unshift(File.dirname(__FILE__))
++#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+ 
+ require 'webmock/test_unit'
+ require 'test/unit'
+--- a/spec/acceptance/net_http/real_net_http_spec.rb
++++ b/spec/acceptance/net_http/real_net_http_spec.rb
+@@ -1,4 +1,4 @@
+-require 'rubygems'
++#require 'rubygems'
+ require 'rspec'
+ require 'net/http'
+ require 'net/https'
+@@ -17,4 +17,4 @@
+   end
+ 
+   it_should_behave_like "Net::HTTP"
+-end
+\ No newline at end of file
++end
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,4 +1,5 @@
+-require 'rubygems'
++# all dependencies are covered in debian/control
++# require 'rubygems'
+ require 'httpclient'
+ unless RUBY_PLATFORM =~ /java/
+   require 'curb'
+@@ -7,8 +8,8 @@
+   require 'typhoeus'
+ end
+ 
+-$LOAD_PATH.unshift(File.dirname(__FILE__))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
++#$LOAD_PATH.unshift(File.dirname(__FILE__))
++#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+ require 'rspec'
+ 
+ require 'webmock/rspec'
diff --git a/debian/patches/series b/debian/patches/series
index 2c559ce..a849e00 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
+port_to_minitest5.patch
 remove-rubygems-curb-version-check.patch
 skip-gem-building-whitespace-tests.patch
+remove-rubygems-in-tests.patch
+deactivate_tests_with_network.patch

-- 
ruby-webmock.git



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