[DRE-commits] [ruby-fakeweb] 02/07: refresh, add, remove patches
Cédric Boutillier
boutil at moszumanska.debian.org
Fri May 2 14:44:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-fakeweb.
commit 60489671e0ce0a62ba73d3a07854fe14cb567455
Author: Cédric Boutillier <boutil at debian.org>
Date: Fri May 2 16:11:21 2014 +0200
refresh, add, remove patches
- drop fix_tests_ruby2.0.patch and require_mocha_setup.patch, integrated
upstream
- add fix_print_file_string_options_deprecation_warning.patch
- add no_bundler_simplecov.patch
---
debian/patches/deactivate_google_tests.patch | 8 ++--
...t_file_string_options_deprecation_warning.patch | 17 +++++++
debian/patches/fix_tests_ruby2.0.patch | 30 ------------
debian/patches/no_bundler_simplecov.patch | 56 ++++++++++++++++++++++
debian/patches/require_mocha_setup.patch | 19 --------
debian/patches/series | 4 +-
6 files changed, 79 insertions(+), 55 deletions(-)
diff --git a/debian/patches/deactivate_google_tests.patch b/debian/patches/deactivate_google_tests.patch
index 93ed908..e513ed5 100644
--- a/debian/patches/deactivate_google_tests.patch
+++ b/debian/patches/deactivate_google_tests.patch
@@ -2,7 +2,7 @@ Description: deactivate tests using test/fixtures/google_response_*
those files have been deleted when repacking
Forwarded: not-needed
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2013-10-04
+Last-Update: 2014-05-02
--- a/test/test_fake_web.rb
+++ b/test/test_fake_web.rb
@@ -23,7 +23,7 @@ Last-Update: 2013-10-04
FakeWeb.register_uri(:post, 'http://www.google.com/', :response => fixture_path("google_response_without_transfer_encoding"))
response = Net::HTTP.start('www.google.com') { |query| query.post('/', '') }
assert_equal "200", response.code
-@@ -498,21 +498,21 @@
+@@ -505,21 +505,21 @@
4.times { assert_equal 'ever_more', Net::HTTP.get(uri) }
end
@@ -48,8 +48,8 @@ Last-Update: 2013-10-04
FakeWeb.register_uri(:get, 'http://www.google.com/', :response => fixture_path("google_response_from_curl"))
response = Net::HTTP.start('www.google.com') { |query| query.get('/') }
assert_not_nil response['transfer-encoding']
-@@ -564,7 +564,7 @@
- assert_equal "test example content", response.body
+@@ -580,7 +580,7 @@
+ assert_equal options_before_request, options
end
- def test_registering_with_a_response_pointing_to_a_pathname
diff --git a/debian/patches/fix_print_file_string_options_deprecation_warning.patch b/debian/patches/fix_print_file_string_options_deprecation_warning.patch
new file mode 100644
index 0000000..8d5e5c2
--- /dev/null
+++ b/debian/patches/fix_print_file_string_options_deprecation_warning.patch
@@ -0,0 +1,17 @@
+Description: fix detection of external caller for deprecation warnings
+ take into account Debian installation path for Ruby libraries.
+Origin: vendor
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-05-02
+
+--- a/lib/fake_web/responder.rb
++++ b/lib/fake_web/responder.rb
+@@ -116,7 +116,7 @@
+
+ def print_file_string_options_deprecation_warning
+ which = options.has_key?(:file) ? :file : :string
+- first_external_caller = caller.detect { |line| !line.include?("/lib/fake_web") }
++ first_external_caller = caller.detect { |line| !line.include?("/vendor_ruby/fake_web") }
+ $stderr.puts
+ $stderr.puts "Deprecation warning: FakeWeb's :#{which} option has been renamed to :body."
+ $stderr.puts "Just replace :#{which} with :body in your FakeWeb.register_uri calls."
diff --git a/debian/patches/fix_tests_ruby2.0.patch b/debian/patches/fix_tests_ruby2.0.patch
deleted file mode 100644
index e7fa04c..0000000
--- a/debian/patches/fix_tests_ruby2.0.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From ac856c369445631118f4a51f73793af1ea5c5e1a Mon Sep 17 00:00:00 2001
-Description: Update test suite for Ruby 2
-Author: Josef Stribny <jstribny at redhat.com>
-Origin: https://github.com/chrisk/fakeweb/commit/ae0e2d9ce0da577262febed92e44b7a87617b88f.patch
-Bug: https://github.com/chrisk/fakeweb/pull/37
-Reviewed-by: Cédric Boutillier <boutil at debian.org>
-Last-update: 2013-02-28
-
---- a/test/test_helper.rb
-+++ b/test/test_helper.rb
-@@ -54,12 +54,18 @@
- OpenSSL::SSL::SSLSocket.expects(:new).with(socket, instance_of(OpenSSL::SSL::SSLContext)).returns(socket).at_least_once
- socket.stubs(:sync_close=).returns(true)
- socket.expects(:connect).with().at_least_once
-+ socket.expects(:session).with().at_least_once if RUBY_VERSION >= "2.0.0"
- else
- socket = mock("TCPSocket")
- Socket.expects(:===).with(socket).at_least_once.returns(true)
- end
-
-- TCPSocket.expects(:open).with(options[:host], options[:port]).returns(socket).at_least_once
-+ if RUBY_VERSION >= "2.0.0"
-+ TCPSocket.expects(:open).with(options[:host], options[:port], nil, nil).returns(socket).at_least_once
-+ else
-+ TCPSocket.expects(:open).with(options[:host], options[:port]).returns(socket).at_least_once
-+ end
-+
- socket.stubs(:closed?).returns(false)
- socket.stubs(:close).returns(true)
-
diff --git a/debian/patches/no_bundler_simplecov.patch b/debian/patches/no_bundler_simplecov.patch
new file mode 100644
index 0000000..11be7ff
--- /dev/null
+++ b/debian/patches/no_bundler_simplecov.patch
@@ -0,0 +1,56 @@
+Description: do not use bundler or simplecov in tests
+Origin: vendor
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-05-02
+
+--- a/test/test_helper.rb
++++ b/test/test_helper.rb
+@@ -1,9 +1,3 @@
+-require 'rubygems'
+-require 'bundler'
+-Bundler.setup
+-
+-require 'helpers/start_simplecov'
+-
+ require 'test/unit'
+ require 'open-uri'
+ require 'pathname'
+--- a/test/test_other_net_http_libraries.rb
++++ b/test/test_other_net_http_libraries.rb
+@@ -25,29 +25,29 @@
+ # start one process per test. The original process (comprising
+ # the rest of the tests) will just get the default name
+ # "Unit Tests".
+- simplecov_code = "SIMPLECOV_COMMAND_NAME = '#{current_test_name}'; require 'helpers/start_simplecov'"
++ #simplecov_code = "SIMPLECOV_COMMAND_NAME = '#{current_test_name}'; require 'helpers/start_simplecov'"
+
+- output = `#{ruby_path} #{current_ruby_opts.join(' ')} #{load_path_opts} -e "#{simplecov_code}; #{requires}; #{additional_code}" 2>&1`
++ #output = `#{ruby_path} #{current_ruby_opts.join(' ')} #{load_path_opts} -e "#{simplecov_code}; #{requires}; #{additional_code}" 2>&1`
+ remove_warnings_from_gems_and_stdlib(output)
+ end
+
+- def test_requiring_samuel_before_fakeweb_prints_warning
++ def _test_requiring_samuel_before_fakeweb_prints_warning
+ output = capture_output_from_requiring %w(samuel fakeweb)
+ assert_match %r(Warning: FakeWeb was loaded after Samuel), output
+ end
+
+- def test_requiring_samuel_after_fakeweb_does_not_print_warning
++ def _test_requiring_samuel_after_fakeweb_does_not_print_warning
+ output = capture_output_from_requiring %w(fakeweb samuel)
+ assert_empty output
+ end
+
+- def test_requiring_right_http_connection_before_fakeweb_and_then_connecting_does_not_print_warning
++ def _test_requiring_right_http_connection_before_fakeweb_and_then_connecting_does_not_print_warning
+ additional_code = "Net::HTTP.start('example.com')"
+ output = capture_output_from_requiring %w(right_http_connection fakeweb), additional_code
+ assert_empty output
+ end
+
+- def test_requiring_right_http_connection_after_fakeweb_and_then_connecting_prints_warning
++ def _test_requiring_right_http_connection_after_fakeweb_and_then_connecting_prints_warning
+ additional_code = "Net::HTTP.start('example.com')"
+ output = capture_output_from_requiring %w(fakeweb right_http_connection), additional_code
+ assert_match %r(Warning: RightHttpConnection was loaded after FakeWeb), output
diff --git a/debian/patches/require_mocha_setup.patch b/debian/patches/require_mocha_setup.patch
deleted file mode 100644
index cbf0c67..0000000
--- a/debian/patches/require_mocha_setup.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Require mocha/setup instead of mocha
- This is the way to ensure Mocha is correctly setup for recent versions.
-Origin: vendor
-Author: Cédric Boutillier <boutil.debian.org>
-Bug: https://github.com/chrisk/fakeweb/issues/46
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741760
-Last-Update: 2014-03-16
-
---- ruby-fakeweb-1.3.0+dfsg1.orig/test/test_helper.rb
-+++ ruby-fakeweb-1.3.0+dfsg1/test/test_helper.rb
-@@ -4,7 +4,7 @@ require 'pathname'
- require 'fake_web'
- require 'rbconfig'
- require 'rubygems'
--require 'mocha'
-+require 'mocha/setup'
-
-
- # Give all tests a common setup and teardown that prevents shared state
diff --git a/debian/patches/series b/debian/patches/series
index 0f1f653..fc6e252 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
-fix_tests_ruby2.0.patch
deactivate_google_tests.patch
-require_mocha_setup.patch
+no_bundler_simplecov.patch
+fix_print_file_string_options_deprecation_warning.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fakeweb.git
More information about the Pkg-ruby-extras-commits
mailing list