[rubygem-httparty/f21] Update to httparty 0.13.1.

Vít Ondruch vondruch at fedoraproject.org
Fri Jul 11 14:22:23 UTC 2014


commit c25932401879885a8e0398fdf9fe74c66d3efdec
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Fri Jul 11 16:05:26 2014 +0200

    Update to httparty 0.13.1.

 .gitignore                                         |    1 +
 httparty-fix-failing-tests.patch                   |   27 -----
 ...gem-httparty-0.10.2-fix-tests-with-ruby-2.patch |   51 ----------
 rubygem-httparty-0.13.1-fix-its-for-rpsec-2.patch  |   26 +++++
 ...rty-0.13.1-make-tests-run-with-rspec-2.10.patch |  106 +++++++++++++++-----
 rubygem-httparty.spec                              |   36 +++----
 sources                                            |    2 +-
 7 files changed, 126 insertions(+), 123 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 265ed1e..e6c3c6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /httparty-0.7.4.gem
 /httparty-0.8.1.gem
 /httparty-0.10.2.gem
+/httparty-0.13.1.gem
diff --git a/rubygem-httparty-0.13.1-fix-its-for-rpsec-2.patch b/rubygem-httparty-0.13.1-fix-its-for-rpsec-2.patch
new file mode 100644
index 0000000..bc630d7
--- /dev/null
+++ b/rubygem-httparty-0.13.1-fix-its-for-rpsec-2.patch
@@ -0,0 +1,26 @@
+--- a/spec/httparty/exception_spec.rb
++++ b/spec/httparty/exception_spec.rb
+@@ -6,18 +6,22 @@
+   its(:ancestors) { should include(StandardError) }
+ 
+   describe HTTParty::UnsupportedFormat do
++    subject { HTTParty::UnsupportedFormat }
+     its(:ancestors) { should include(HTTParty::Error) }
+   end
+   
+   describe HTTParty::UnsupportedURIScheme do
++    subject { HTTParty::UnsupportedURIScheme }
+     its(:ancestors) { should include(HTTParty::Error) }
+   end
+ 
+   describe HTTParty::ResponseError do
++    subject { HTTParty::ResponseError }
+     its(:ancestors) { should include(HTTParty::Error) }
+   end
+ 
+   describe HTTParty::RedirectionTooDeep do
++    subject { HTTParty::RedirectionTooDeep }
+     its(:ancestors) { should include(HTTParty::ResponseError) }
+   end
+ end
+
diff --git a/rubygem-httparty-0.10.2-make-tests-run-with-rspec-2.10.patch b/rubygem-httparty-0.13.1-make-tests-run-with-rspec-2.10.patch
similarity index 71%
rename from rubygem-httparty-0.10.2-make-tests-run-with-rspec-2.10.patch
rename to rubygem-httparty-0.13.1-make-tests-run-with-rspec-2.10.patch
index 51b1420..deb38d1 100644
--- a/rubygem-httparty-0.10.2-make-tests-run-with-rspec-2.10.patch
+++ b/rubygem-httparty-0.13.1-make-tests-run-with-rspec-2.10.patch
@@ -8,7 +8,7 @@ diff --git a/spec/httparty/connection_adapter_spec.rb b/spec/httparty/connection
 index 210f655..6dab368 100644
 --- a/spec/httparty/connection_adapter_spec.rb
 +++ b/spec/httparty/connection_adapter_spec.rb
-@@ -109,6 +109,8 @@ describe HTTParty::ConnectionAdapter do
+@@ -125,6 +125,8 @@ describe HTTParty::ConnectionAdapter do
            http = mock("http", :null_object => true)
            http.should_not_receive(:open_timeout=)
            http.should_not_receive(:read_timeout=)
@@ -17,7 +17,7 @@ index 210f655..6dab368 100644
            Net::HTTP.stub(:new => http)
  
            adapter.connection
-@@ -130,6 +132,8 @@ describe HTTParty::ConnectionAdapter do
+@@ -146,6 +148,8 @@ describe HTTParty::ConnectionAdapter do
              http = mock("http", :null_object => true)
              http.should_not_receive(:open_timeout=)
              http.should_not_receive(:read_timeout=)
@@ -26,7 +26,45 @@ index 210f655..6dab368 100644
              Net::HTTP.stub(:new => http)
  
              adapter.connection
-
+@@ -161,6 +165,9 @@ describe HTTParty::ConnectionAdapter do
+         it "should not set the open_timeout" do
+           http = mock("http", :null_object => true)
+           http.should_not_receive(:open_timeout=)
++          http.should_receive(:read_timeout=).with(6)
++          http.should_receive(:use_ssl=).with(false)
++          http.should_receive(:use_ssl?)
+           Net::HTTP.stub(:new => http)
+           adapter.connection
+         end
+@@ -176,6 +183,8 @@ describe HTTParty::ConnectionAdapter do
+           http = mock("http", :null_object => true)
+           http.should_receive(:open_timeout=)
+           http.should_receive(:read_timeout=).twice
++          http.should_receive(:use_ssl=).with(false)
++          http.should_receive(:use_ssl?)
+           Net::HTTP.stub(:new => http)
+           adapter.connection
+         end
+@@ -188,7 +197,10 @@ describe HTTParty::ConnectionAdapter do
+ 
+         it "should not set the read_timeout" do
+           http = mock("http", :null_object => true)
++          http.should_receive(:open_timeout=).with(7)
+           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
+         end
+@@ -204,6 +216,8 @@ describe HTTParty::ConnectionAdapter do
+           http = mock("http", :null_object => true)
+           http.should_receive(:open_timeout=).twice
+           http.should_receive(:read_timeout=)
++          http.should_receive(:use_ssl=).with(false)
++          http.should_receive(:use_ssl?)
+           Net::HTTP.stub(:new => http)
+           adapter.connection
+         end
 commit 57747e2e0c64f9cec0b2a0f9a1c7ddef3aadf959
 Author: Bohuslav Kabrda <bkabrda at redhat.com>
 Date:   Thu Mar 14 14:06:16 2013 +0100
@@ -37,7 +75,16 @@ diff --git a/spec/httparty/request_spec.rb b/spec/httparty/request_spec.rb
 index f944ab2..8497a66 100644
 --- a/spec/httparty/request_spec.rb
 +++ b/spec/httparty/request_spec.rb
-@@ -259,7 +259,7 @@ describe HTTParty::Request do
+@@ -113,7 +113,7 @@ describe HTTParty::Request do
+ 
+       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).with({'www-authenticate' => nil})
+       @post_request.options[:digest_auth] = {:username => 'foobar', :password => 'secret'}
+       @post_request.send(:setup_raw_request)
+     end
+@@ -367,7 +367,7 @@ describe HTTParty::Request do
            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"
@@ -45,8 +92,8 @@ index f944ab2..8497a66 100644
 +          response.to_hash.should == {"hash" => {"foo" => "bar"}}
          end
  
-         it "redirects if a 300 contains a relative location header" do
-@@ -272,7 +272,7 @@ describe HTTParty::Request do
+         it "calls block given to perform with each redirect" do
+@@ -389,7 +389,7 @@ describe HTTParty::Request do
            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"
@@ -55,7 +102,7 @@ index f944ab2..8497a66 100644
          end
  
          it "handles multiple redirects and relative location headers on different hosts" do
-@@ -285,7 +285,7 @@ describe HTTParty::Request do
+@@ -402,7 +402,7 @@ describe HTTParty::Request do
            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"
@@ -64,7 +111,7 @@ index f944ab2..8497a66 100644
          end
  
          it "returns the HTTParty::Response when the 300 does not contain a location header" do
-@@ -334,7 +334,7 @@ describe HTTParty::Request do
+@@ -451,7 +451,7 @@ describe HTTParty::Request do
    it "should not fail for missing mime type" do
      stub_response "Content for you"
      @request.options[:format] = :html
@@ -73,7 +120,7 @@ index f944ab2..8497a66 100644
    end
  
    describe "a request that redirects" do
-@@ -351,42 +351,42 @@ describe HTTParty::Request do
+@@ -468,47 +468,47 @@ describe HTTParty::Request do
        end
  
        it "should be handled by GET transparently" do
@@ -99,6 +146,12 @@ index f944ab2..8497a66 100644
 +        @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"}}
@@ -124,7 +177,7 @@ index f944ab2..8497a66 100644
        end
  
        it "should keep track of cookies between redirects" do
-@@ -417,14 +417,14 @@ describe HTTParty::Request do
+@@ -544,14 +544,14 @@ describe HTTParty::Request do
  
        it 'should make resulting request a get request if it not already' do
          @request.http_method = Net::HTTP::Delete
@@ -140,8 +193,7 @@ index f944ab2..8497a66 100644
 +        @request.perform.to_hash.should == {"hash" => {"foo" => "bar"}}
          @request.http_method.should == Net::HTTP::Delete
        end
-     end
-
+ 
 commit 621a0b7eec4ea97afdde2dbfd5d2f33556f9bc4f
 Author: Bohuslav Kabrda <bkabrda at redhat.com>
 Date:   Thu Mar 14 13:55:10 2013 +0100
@@ -152,17 +204,21 @@ diff --git a/spec/httparty/ssl_spec.rb b/spec/httparty/ssl_spec.rb
 index 221c4c9..17027f5 100644
 --- a/spec/httparty/ssl_spec.rb
 +++ b/spec/httparty/ssl_spec.rb
-@@ -11,19 +11,19 @@ describe HTTParty::Request do
+@@ -17,7 +17,7 @@ describe HTTParty::Request do
      end
  
-     it "should work when no trusted CA list is specified" do
--      ssl_verify_test(nil, nil, "selfsigned.crt").should == {'success' => true}
-+      ssl_verify_test(nil, nil, "selfsigned.crt").to_hash.should == {'success' => true}
+     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 work when no trusted CA list is specified, even with a bogus hostname" do
--      ssl_verify_test(nil, nil, "bogushost.crt").should == {'success' => true}
-+      ssl_verify_test(nil, nil, "bogushost.crt").to_hash.should == {'success' => true}
+     it "should fail when no trusted CA list is specified, with a bogus hostname, by default" do
+@@ -27,15 +27,15 @@ describe HTTParty::Request do
+     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
@@ -195,7 +251,7 @@ index f0d54c5..55c5374 100644
  require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
  
  describe HTTParty do
-@@ -369,7 +370,7 @@ describe HTTParty do
+@@ -387,7 +388,7 @@ describe HTTParty do
        end.with(URI.parse(uri), kind_of(Hash))
        FakeWeb.register_uri(:get, uri, :body => 'stuff')
        @klass.connection_adapter connection_adapter, connection_adapter_options
@@ -204,7 +260,7 @@ index f0d54c5..55c5374 100644
      end
    end
  
-@@ -645,7 +646,7 @@ describe HTTParty do
+@@ -668,7 +669,7 @@ describe HTTParty do
    describe "#get" do
      it "should be able to get html" do
        stub_http_response_with('google.html')
@@ -213,7 +269,7 @@ index f0d54c5..55c5374 100644
      end
  
      it "should be able to get chunked html" do
-@@ -654,7 +655,7 @@ describe HTTParty do
+@@ -677,7 +678,7 @@ describe HTTParty do
  
        HTTParty.get('http://www.google.com') do |fragment|
          chunks.should include(fragment)
@@ -222,7 +278,7 @@ index f0d54c5..55c5374 100644
      end
  
      it "should be able parse response type json automatically" do
-@@ -694,7 +695,7 @@ describe HTTParty do
+@@ -725,7 +726,7 @@ describe HTTParty do
      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')
@@ -242,8 +298,8 @@ diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
 index a85b2b1..d51ae2c 100644
 --- a/spec/spec_helper.rb
 +++ b/spec/spec_helper.rb
-@@ -1,7 +1,11 @@
- $:.push File.expand_path("../lib", __FILE__)
+@@ -2,7 +2,11 @@
+ 
  require "httparty"
  
 -require 'spec/autorun'
diff --git a/rubygem-httparty.spec b/rubygem-httparty.spec
index c0e196a..5568bd2 100644
--- a/rubygem-httparty.spec
+++ b/rubygem-httparty.spec
@@ -3,27 +3,20 @@
 
 Summary: Makes HTTP fun! Also, makes consuming restful web services dead easy
 Name: rubygem-%{gem_name}
-Version: 0.10.2
-Release: 3%{?dist}
+Version: 0.13.1
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
-URL: http://httparty.rubyforge.org
+URL: http://jnunemaker.github.com/httparty
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
 # https://github.com/jnunemaker/httparty/pull/192
-Patch0: rubygem-httparty-0.10.2-make-tests-run-with-rspec-2.10.patch
-# https://github.com/jnunemaker/httparty/pull/194
-Patch1: rubygem-httparty-0.10.2-fix-tests-with-ruby-2.patch
-Requires: ruby(rubygems)
-Requires: rubygem(multi_json)
-Requires: rubygem(multi_xml)
-Requires: ruby(release)
+Patch0: rubygem-httparty-0.13.1-make-tests-run-with-rspec-2.10.patch
+Patch1: rubygem-httparty-0.13.1-fix-its-for-rpsec-2.patch
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(rspec)
 BuildRequires: rubygem(fakeweb)
-BuildRequires: rubygem(multi_json)
 BuildRequires: rubygem(multi_xml)
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 Makes HTTP fun! Also, makes consuming restful web services dead easy.
@@ -59,23 +52,22 @@ mkdir -p %{buildroot}%{_bindir}
 cp -a .%{_bindir}/* \
         %{buildroot}%{_bindir}/
 
-rm -rf %{buildroot}%{gem_instdir}/bin
 find %{buildroot}%{_bindir} -type f | xargs chmod a+x
-rm -f  %{buildroot}%{gem_instdir}/.gitignore
-rm -f  %{buildroot}%{gem_instdir}/httparty.gemspec
-rm -f  %{buildroot}%{gem_instdir}/.rvmrc
-rm -f  %{buildroot}%{gem_instdir}/Gemfile*
+
+# Fix permissions.
+chmod a+x %{buildroot}%{gem_instdir}/script/release
 
 %check
 pushd .%{gem_instdir}
-export LANG=en_US.utf8
-rspec spec
+LANG=en_US.utf8 rspec spec
 popd
 
 %files
 %exclude %{gem_instdir}/.travis.yml
 %{_bindir}/httparty
 %dir %{gem_instdir}
+%{gem_instdir}/bin
+%exclude %{gem_instdir}/.*
 %{gem_libdir}
 %doc %{gem_instdir}/README.md
 %doc %{gem_instdir}/MIT-LICENSE
@@ -85,15 +77,21 @@ popd
 
 %files doc
 %{gem_docdir}
+%{gem_instdir}/Gemfile
 %{gem_instdir}/Guardfile
 %{gem_instdir}/Rakefile
 %{gem_instdir}/examples
+%{gem_instdir}/httparty.gemspec
+%{gem_instdir}/script
 %{gem_instdir}/spec
 %{gem_instdir}/website
 %{gem_instdir}/features
 %{gem_instdir}/*.yml
 
 %changelog
+* Thu Jul 10 2014 Vít Ondruch <vondruch at redhat.com> - 0.13.1-1
+- Update to httparty 0.13.1.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index 0910c89..1bf7ff1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5db5cd28124b944cc513a23b2f17119b  httparty-0.10.2.gem
+6345ed91b4bc9487558efdcc7dc90cf2  httparty-0.13.1.gem


More information about the scm-commits mailing list