[DRE-commits] [ruby-httparty] 07/07: delete old patches
Cédric Boutillier
boutil at moszumanska.debian.org
Sun May 24 22:46:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-httparty.
commit 887d3cce2f6120d7903cbab2c1e91e8106dfd279
Author: Cédric Boutillier <boutil at debian.org>
Date: Mon May 25 00:43:48 2015 +0200
delete old patches
---
debian/patches/clean_spec_helper.patch | 24 ---
debian/patches/deactivate_failing_test.patch | 17 --
debian/patches/exception_spec.patch | 46 -----
debian/patches/fix_rspec_deprecation_warning.patch | 119 ------------
debian/patches/newer_rspec.patch | 206 ---------------------
.../patches/spec_convert_nil_to_empty_string.patch | 17 --
6 files changed, 429 deletions(-)
diff --git a/debian/patches/clean_spec_helper.patch b/debian/patches/clean_spec_helper.patch
deleted file mode 100644
index 82914d4..0000000
--- a/debian/patches/clean_spec_helper.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: clean spec_helper
- - do not modify loadpath
- - set external encoding
- - don't use deprecated spec
-Author: Cédric Boutillier <boutil at debian.org>
-Origin: vendor
-Forwarded: no
-Last-Update: 2014-02-27
-
---- a/spec/spec_helper.rb
-+++ b/spec/spec_helper.rb
-@@ -1,10 +1,8 @@
--$:.push File.expand_path("../lib", __FILE__)
--
- require "httparty"
--
--require 'spec/autorun'
- require 'fakeweb'
-
-+Encoding.default_external = "utf-8" if defined? Encoding
-+
- def file_fixture(filename)
- open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read
- end
diff --git a/debian/patches/deactivate_failing_test.patch b/debian/patches/deactivate_failing_test.patch
deleted file mode 100644
index 5bcb6df..0000000
--- a/debian/patches/deactivate_failing_test.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: deactivate failing test
-Author: Cédric Boutillier <boutil at debian.org>
-Origin: vendor
-Forwarded: no
-Last-Update: 2014-01-11
-
---- a/spec/httparty/request_spec.rb
-+++ b/spec/httparty/request_spec.rb
-@@ -113,7 +113,7 @@
-
- http = @post_request.send(:http)
- @post_request.should_receive(:http).and_return(http)
-- http.should_not_receive(:head).and_return({'www-authenticate' => nil})
-+ #http.should_not_receive(:head).and_return({'www-authenticate' => nil})
- @post_request.options[:digest_auth] = {:username => 'foobar', :password => 'secret'}
- @post_request.send(:setup_raw_request)
- end
diff --git a/debian/patches/exception_spec.patch b/debian/patches/exception_spec.patch
deleted file mode 100644
index 405ff29..0000000
--- a/debian/patches/exception_spec.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: rewrite exception_spec.rb to adapt to newer RSpec
- and avoid subject memoization issues
-Origin: vendor
-Author: Cédric Boutillier <boutil at debian.org>
-Forwarded: no
-Last-Update: 2014-02-28
-
---- a/spec/httparty/exception_spec.rb
-+++ b/spec/httparty/exception_spec.rb
-@@ -1,23 +1,21 @@
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
-
- describe HTTParty::Error do
-- subject { described_class }
-+ specify { described_class.ancestors.should include(StandardError) }
-+end
-
-- its(:ancestors) { should include(StandardError) }
-+describe HTTParty::UnsupportedFormat do
-+ specify { described_class.ancestors.should include(HTTParty::Error) }
-+end
-
-- describe HTTParty::UnsupportedFormat do
-- its(:ancestors) { should include(HTTParty::Error) }
-- end
--
-- describe HTTParty::UnsupportedURIScheme do
-- its(:ancestors) { should include(HTTParty::Error) }
-- end
-+describe HTTParty::UnsupportedURIScheme do
-+ specify { described_class.ancestors.should include(HTTParty::Error) }
-+end
-
-- describe HTTParty::ResponseError do
-- its(:ancestors) { should include(HTTParty::Error) }
-- end
-+describe HTTParty::ResponseError do
-+ specify { described_class.ancestors.should include(HTTParty::Error) }
-+end
-
-- describe HTTParty::RedirectionTooDeep do
-- its(:ancestors) { should include(HTTParty::ResponseError) }
-- end
-+describe HTTParty::RedirectionTooDeep do
-+ specify { described_class.ancestors.should include(HTTParty::ResponseError) }
- end
diff --git a/debian/patches/fix_rspec_deprecation_warning.patch b/debian/patches/fix_rspec_deprecation_warning.patch
deleted file mode 100644
index 14e10be..0000000
--- a/debian/patches/fix_rspec_deprecation_warning.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-Description: fix RSpec deprecation warnings
-Author: Cédric Boutillier <boutil at debian.org>
-Origin: vendor
-Forwarded: no
-Last-Update: 2014-01-11
-
---- a/spec/httparty/request_spec.rb
-+++ b/spec/httparty/request_spec.rb
-@@ -324,7 +324,7 @@
- redirect = stub_response '', 300
- redirect['location'] = 'http://foo.com/foo'
- ok = stub_response('<hash><foo>bar</foo></hash>', 200)
-- @http.stub!(:request).and_return(redirect, ok)
-+ @http.stub(:request).and_return(redirect, ok)
- response = @request.perform
- response.request.base_uri.to_s.should == "http://foo.com"
- response.request.path.to_s.should == "http://foo.com/foo"
-@@ -346,7 +346,7 @@
- redirect = stub_response '', 300
- redirect['location'] = '/foo/bar'
- ok = stub_response('<hash><foo>bar</foo></hash>', 200)
-- @http.stub!(:request).and_return(redirect, ok)
-+ @http.stub(:request).and_return(redirect, ok)
- response = @request.perform
- response.request.base_uri.to_s.should == "http://api.foo.com"
- response.request.path.to_s.should == "/foo/bar"
-@@ -427,7 +427,7 @@
-
- describe "once" do
- before(:each) do
-- @http.stub!(:request).and_return(@redirect, @ok)
-+ @http.stub(:request).and_return(@redirect, @ok)
- end
-
- it "should be handled by GET transparently" do
-@@ -528,7 +528,7 @@
-
- describe "infinitely" do
- before(:each) do
-- @http.stub!(:request).and_return(@redirect)
-+ @http.stub(:request).and_return(@redirect)
- end
-
- it "should raise an exception" do
-@@ -542,28 +542,28 @@
- before do
- @request.options[:format] = :html
- @last_response = mock()
-- @last_response.stub!(:body).and_return('')
-+ @last_response.stub(:body).and_return('')
- end
-
- it "should inflate the gzipped body with content-encoding: gzip" do
-- @last_response.stub!(:[]).with("content-encoding").and_return("gzip")
-- @request.stub!(:last_response).and_return(@last_response)
-+ @last_response.stub(:[]).with("content-encoding").and_return("gzip")
-+ @request.stub(:last_response).and_return(@last_response)
- Zlib::GzipReader.should_receive(:new).and_return(StringIO.new(''))
- @request.last_response.should_receive(:delete).with('content-encoding')
- @request.send(:handle_deflation)
- end
-
- it "should inflate the gzipped body with content-encoding: x-gzip" do
-- @last_response.stub!(:[]).with("content-encoding").and_return("x-gzip")
-- @request.stub!(:last_response).and_return(@last_response)
-+ @last_response.stub(:[]).with("content-encoding").and_return("x-gzip")
-+ @request.stub(:last_response).and_return(@last_response)
- Zlib::GzipReader.should_receive(:new).and_return(StringIO.new(''))
- @request.last_response.should_receive(:delete).with('content-encoding')
- @request.send(:handle_deflation)
- end
-
- it "should inflate the deflated body" do
-- @last_response.stub!(:[]).with("content-encoding").and_return("deflate")
-- @request.stub!(:last_response).and_return(@last_response)
-+ @last_response.stub(:[]).with("content-encoding").and_return("deflate")
-+ @request.stub(:last_response).and_return(@last_response)
- Zlib::Inflate.should_receive(:inflate).and_return('')
- @request.last_response.should_receive(:delete).with('content-encoding')
- @request.send(:handle_deflation)
---- a/spec/httparty_spec.rb
-+++ b/spec/httparty_spec.rb
-@@ -183,7 +183,7 @@
- end
-
- it "should not be in the headers by default" do
-- HTTParty::Request.stub!(:new).and_return(stub(nil, :perform => nil))
-+ HTTParty::Request.stub(:new).and_return(stub(nil, :perform => nil))
- @klass.get("")
- @klass.headers.keys.should_not include("cookie")
- end
---- a/spec/support/stub_response.rb
-+++ b/spec/support/stub_response.rb
-@@ -5,7 +5,7 @@
- data = file_fixture(filename)
-
- response = Net::HTTPOK.new("1.1", 200, "Content for you")
-- response.stub!(:body).and_return(data)
-+ response.stub(:body).and_return(data)
-
- http_request = HTTParty::Request.new(Net::HTTP::Get, 'http://localhost', :format => format)
- http_request.stub_chain(:http, :request).and_return(response)
-@@ -30,13 +30,13 @@
- @request.options[:base_uri] ||= 'http://localhost'
- unless defined?(@http) && @http
- @http = Net::HTTP.new('localhost', 80)
-- @request.stub!(:http).and_return(@http)
-+ @request.stub(:http).and_return(@http)
- end
-
- response = Net::HTTPResponse::CODE_TO_OBJ[code.to_s].new("1.1", code, body)
-- response.stub!(:body).and_return(body)
-+ response.stub(:body).and_return(body)
-
-- @http.stub!(:request).and_return(response)
-+ @http.stub(:request).and_return(response)
- response
- end
- end
diff --git a/debian/patches/newer_rspec.patch b/debian/patches/newer_rspec.patch
deleted file mode 100644
index 6430d6b..0000000
--- a/debian/patches/newer_rspec.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-Description: run specs with RSpec 2
-Author: Bohuslav Kabrda <bkabrda at redhat.com>
-Origin: https://github.com/jnunemaker/httparty/pull/192
-Reviewed-by: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-02-27
-
---- a/spec/httparty/connection_adapter_spec.rb
-+++ b/spec/httparty/connection_adapter_spec.rb
-@@ -125,6 +125,8 @@
- http = mock("http", :null_object => true)
- http.should_not_receive(:open_timeout=)
- http.should_not_receive(:read_timeout=)
-+ http.should_receive(:use_ssl=).with(false)
-+ http.should_receive(:use_ssl?)
- Net::HTTP.stub(:new => http)
-
- adapter.connection
-@@ -146,6 +148,8 @@
- http = mock("http", :null_object => true)
- http.should_not_receive(:open_timeout=)
- http.should_not_receive(:read_timeout=)
-+ http.should_receive(:use_ssl=).with(false)
-+ http.should_receive(:use_ssl?)
- Net::HTTP.stub(:new => http)
-
- adapter.connection
---- a/spec/httparty/request_spec.rb
-+++ b/spec/httparty/request_spec.rb
-@@ -360,7 +360,7 @@
- response.request.path.to_s.should == "http://foo.com/foo"
- response.request.uri.request_uri.should == "/foo"
- response.request.uri.to_s.should == "http://foo.com/foo"
-- response.should == {"hash" => {"foo" => "bar"}}
-+ response.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "calls block given to perform with each redirect" do
-@@ -382,7 +382,7 @@
- response.request.path.to_s.should == "/foo/bar"
- response.request.uri.request_uri.should == "/foo/bar"
- response.request.uri.to_s.should == "http://api.foo.com/foo/bar"
-- response.should == {"hash" => {"foo" => "bar"}}
-+ response.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "handles multiple redirects and relative location headers on different hosts" do
-@@ -395,7 +395,7 @@
- response.request.path.to_s.should == "/v3"
- response.request.uri.request_uri.should == "/v3"
- response.request.uri.to_s.should == "http://api.foo.com/v3"
-- response.should == {"hash" => {"foo" => "bar"}}
-+ response.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "returns the HTTParty::Response when the 300 does not contain a location header" do
-@@ -444,7 +444,7 @@
- it "should not fail for missing mime type" do
- stub_response "Content for you"
- @request.options[:format] = :html
-- @request.perform.should == 'Content for you'
-+ @request.perform.to_s.should == 'Content for you'
- end
-
- describe "a request that redirects" do
-@@ -461,47 +461,47 @@
- end
-
- it "should be handled by GET transparently" do
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by POST transparently" do
- @request.http_method = Net::HTTP::Post
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by DELETE transparently" do
- @request.http_method = Net::HTTP::Delete
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by MOVE transparently" do
- @request.http_method = Net::HTTP::Move
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by COPY transparently" do
- @request.http_method = Net::HTTP::Copy
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by PATCH transparently" do
- @request.http_method = Net::HTTP::Patch
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by PUT transparently" do
- @request.http_method = Net::HTTP::Put
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by HEAD transparently" do
- @request.http_method = Net::HTTP::Head
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should be handled by OPTIONS transparently" do
- @request.http_method = Net::HTTP::Options
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- end
-
- it "should keep track of cookies between redirects" do
-@@ -537,14 +537,14 @@
-
- it 'should make resulting request a get request if it not already' do
- @request.http_method = Net::HTTP::Delete
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- @request.http_method.should == Net::HTTP::Get
- end
-
- it 'should not make resulting request a get request if options[:maintain_method_across_redirects] is true' do
- @request.options[:maintain_method_across_redirects] = true
- @request.http_method = Net::HTTP::Delete
-- @request.perform.should == {"hash" => {"foo" => "bar"}}
-+ @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
- @request.http_method.should == Net::HTTP::Delete
- end
-
---- a/spec/httparty/ssl_spec.rb
-+++ b/spec/httparty/ssl_spec.rb
-@@ -17,7 +17,7 @@
- end
-
- it "should work when no trusted CA list is specified, when the verify option is set to false" do
-- ssl_verify_test(nil, nil, "selfsigned.crt", :verify => false).should == {'success' => true}
-+ ssl_verify_test(nil, nil, "selfsigned.crt", :verify => false).to_hash.should == {'success' => true}
- end
-
- it "should fail when no trusted CA list is specified, with a bogus hostname, by default" do
-@@ -27,15 +27,15 @@
- end
-
- it "should work when no trusted CA list is specified, even with a bogus hostname, when the verify option is set to true" do
-- ssl_verify_test(nil, nil, "bogushost.crt", :verify => false).should == {'success' => true}
-+ ssl_verify_test(nil, nil, "bogushost.crt", :verify => false).to_hash.should == {'success' => true}
- end
-
- it "should work when using ssl_ca_file with a self-signed CA" do
-- ssl_verify_test(:ssl_ca_file, "selfsigned.crt", "selfsigned.crt").should == {'success' => true}
-+ ssl_verify_test(:ssl_ca_file, "selfsigned.crt", "selfsigned.crt").to_hash.should == {'success' => true}
- end
-
- it "should work when using ssl_ca_file with a certificate authority" do
-- ssl_verify_test(:ssl_ca_file, "ca.crt", "server.crt").should == {'success' => true}
-+ ssl_verify_test(:ssl_ca_file, "ca.crt", "server.crt").to_hash.should == {'success' => true}
- end
-
- it "should work when using ssl_ca_path with a certificate authority" do
---- a/spec/httparty_spec.rb
-+++ b/spec/httparty_spec.rb
-@@ -387,7 +387,7 @@
- end.with(URI.parse(uri), kind_of(Hash))
- FakeWeb.register_uri(:get, uri, :body => 'stuff')
- @klass.connection_adapter connection_adapter, connection_adapter_options
-- @klass.get(uri).should == 'stuff'
-+ @klass.get(uri).to_s.should == 'stuff'
- end
- end
-
-@@ -668,7 +668,7 @@
- describe "#get" do
- it "should be able to get html" do
- stub_http_response_with('google.html')
-- HTTParty.get('http://www.google.com').should == file_fixture('google.html')
-+ HTTParty.get('http://www.google.com').to_s.should == file_fixture('google.html')
- end
-
- it "should be able to get chunked html" do
-@@ -677,7 +677,7 @@
-
- HTTParty.get('http://www.google.com') do |fragment|
- chunks.should include(fragment)
-- end.should == chunks.join
-+ end.to_s.should == chunks.join
- end
-
- it "should be able parse response type json automatically" do
-@@ -725,7 +725,7 @@
- it "should not get undefined method add_node for nil class for the following xml" do
- stub_http_response_with('undefined_method_add_node_for_nil.xml')
- result = HTTParty.get('http://foobar.com')
-- result.should == {"Entities"=>{"href"=>"https://s3-sandbox.parature.com/api/v1/5578/5633/Account", "results"=>"0", "total"=>"0", "page_size"=>"25", "page"=>"1"}}
-+ result.to_hash.should == {"Entities"=>{"href"=>"https://s3-sandbox.parature.com/api/v1/5578/5633/Account", "results"=>"0", "total"=>"0", "page_size"=>"25", "page"=>"1"}}
- end
-
- it "should parse empty response fine" do
diff --git a/debian/patches/spec_convert_nil_to_empty_string.patch b/debian/patches/spec_convert_nil_to_empty_string.patch
deleted file mode 100644
index 2c6d33c..0000000
--- a/debian/patches/spec_convert_nil_to_empty_string.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: replace chunk by an empty string if is nil
- Trying to add nil to a string gives an error causing FTBFS
-Bug-Debian: https://bugs.debian.org/747734
-Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-06-16
-
---- a/spec/httparty/request_spec.rb
-+++ b/spec/httparty/request_spec.rb
-@@ -368,7 +368,7 @@
- FakeWeb.register_uri(:get, "http://test.com/redirect", :status => [300, "REDIRECT"], :location => "http://api.foo.com/v2")
- FakeWeb.register_uri(:get, "http://api.foo.com/v2", :body => "<hash><foo>bar</foo></hash>")
- body = ""
-- response = @request.perform { |chunk| body += chunk }
-+ response = @request.perform { |chunk| body += chunk || "" }
- body.length.should == 27
- end
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-httparty.git
More information about the Pkg-ruby-extras-commits
mailing list