[rubygem-httparty/f17: 1/2] Rebuilt for Ruby 1.9.3 Update to version 0.8.1

Vít Ondruch vondruch at fedoraproject.org
Wed Mar 7 12:22:05 UTC 2012


commit 4dbc238f234ebd08a27546d1bdc9f12a7096be96
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Wed Mar 7 13:21:41 2012 +0100

    Rebuilt for Ruby 1.9.3
    Update to version 0.8.1

 .gitignore                       |    1 +
 httparty-fix-failing-tests.patch |   27 +++++++++
 rubygem-httparty.spec            |  112 ++++++++++++++++++++++----------------
 sources                          |    2 +-
 4 files changed, 95 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f3da3e4..8387897 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /httparty-0.6.1.gem
 /httparty-0.7.4.gem
+/httparty-0.8.1.gem
diff --git a/httparty-fix-failing-tests.patch b/httparty-fix-failing-tests.patch
new file mode 100644
index 0000000..07c8a68
--- /dev/null
+++ b/httparty-fix-failing-tests.patch
@@ -0,0 +1,27 @@
+diff --git a/spec/httparty/request_spec.rb b/spec/httparty/request_spec.rb
+index 630ff3b..ad03fe1 100644
+--- a/spec/httparty/request_spec.rb
++++ b/spec/httparty/request_spec.rb
+@@ -223,6 +223,8 @@ describe HTTParty::Request do
+         http = mock("http", :null_object => true)
+         http.should_not_receive(:open_timeout=)
+         http.should_not_receive(:read_timeout=)
++        http.should_receive(:use_ssl=)
++        http.should_receive(:use_ssl?)
+         Net::HTTP.stub(:new => http)
+ 
+         request = HTTParty::Request.new(Net::HTTP::Get, 'https://foobar.com', {:timeout => "five seconds"})
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 1d64b1d..ad526d1 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,7 +1,7 @@
+ $:.push File.expand_path("../lib", __FILE__)
+ require "httparty"
+ 
+-require 'spec/autorun'
++#require 'spec/autorun'
+ require 'fakeweb'
+ 
+ def file_fixture(filename)
+
diff --git a/rubygem-httparty.spec b/rubygem-httparty.spec
index 5b31466..86810d0 100644
--- a/rubygem-httparty.spec
+++ b/rubygem-httparty.spec
@@ -1,27 +1,28 @@
 # Generated from httparty-0.6.1.gem by gem2rpm -*- rpm-spec -*-
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname httparty
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global gem_name httparty
 
 Summary: Makes HTTP fun! Also, makes consuming restful web services dead easy
-Name: rubygem-%{gemname}
-Version: 0.7.4
-Release: 2%{?dist}
+Name: rubygem-%{gem_name}
+Version: 0.8.1
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://httparty.rubyforge.org
-Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# https://github.com/jnunemaker/httparty/issues/125
+Patch0: httparty-fix-failing-tests.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: rubygems
-Requires: rubygem(crack) = 0.1.8
-Requires: ruby(abi) = 1.8
-BuildRequires: rubygems
-# Waiting to enable check until jeweler is in Fedora
-# BuildRequires(check): rubygem(rspec)
-# BuildRequires(check): rubygem(jeweler)
-# BuildRequires(chekc): rubygem(fakeweb)
+Requires: ruby(rubygems)
+Requires: rubygem(multi_json)
+Requires: rubygem(multi_xml)
+Requires: ruby(abi) = 1.9.1
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(fakeweb)
+BuildRequires: rubygem(multi_json)
+BuildRequires: rubygem(multi_xml)
 BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
+Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 Makes HTTP fun! Also, makes consuming restful web services dead easy.
@@ -36,55 +37,74 @@ Requires: %{name} = %{version}-%{release}
 This package contains documentation for %{name}.
 
 %prep
+%setup -q -c -T
+mkdir -p .%{gem_dir}
+gem install --local --install-dir .%{gem_dir} \
+            --bindir .%{_bindir} \
+            --force %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
 
 %build
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-gem install --local --install-dir %{buildroot}%{gemdir} \
-            --force --rdoc %{SOURCE0}
-mkdir -p %{buildroot}/%{_bindir}
-mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
-rmdir %{buildroot}%{gemdir}/bin
-find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
-rm -f  %{buildroot}%{geminstdir}/.gitignore
-rm -f  %{buildroot}%{geminstdir}/httparty.gemspec
-rm -f  %{buildroot}%{geminstdir}/.rvmrc
-rm -f  %{buildroot}%{geminstdir}/Gemfile*
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+
+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*
 
 %clean
 rm -rf %{buildroot}
 
 %check
-cd %{buildroot}%{geminstdir}
-# Requires Jewler for testing which is currently under review
-# rake spec
+pushd .%{gem_instdir}
+# modify the parser.rb to allow instantiation of HTTParty::Parser for specs
+sed -i '96d' lib/httparty/parser.rb
+# still one SSL failure, reported https://github.com/jnunemaker/httparty/issues/125
+export LANG=en_US.utf8
+rspec spec | grep '257 examples, 1 failure, 2 pending'
+popd
 
 %files
 %defattr(-, root, root, -)
 %{_bindir}/httparty
-%dir %{geminstdir}
-%{geminstdir}/lib
-%doc %{geminstdir}/README.rdoc
-%doc %{geminstdir}/MIT-LICENSE
-%doc %{geminstdir}/History
-%doc %{geminstdir}/Manifest
-%{geminstdir}/bin
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%dir %{gem_instdir}
+%{gem_libdir}
+%doc %{gem_instdir}/README.rdoc
+%doc %{gem_instdir}/MIT-LICENSE
+%doc %{gem_instdir}/History
+%{gem_cache}
+%{gem_spec}
 
 %files doc
 %defattr(-, root, root, -)
-%{gemdir}/doc/%{gemname}-%{version}
-%{geminstdir}/Rakefile
-%{geminstdir}/examples
-%{geminstdir}/spec
-%{geminstdir}/website
-%{geminstdir}/features
-%{geminstdir}/*.yml
+%{gem_docdir}
+%{gem_instdir}/Rakefile
+%{gem_instdir}/examples
+%{gem_instdir}/spec
+%{gem_instdir}/website
+%{gem_instdir}/features
+%{gem_instdir}/*.yml
 
 %changelog
+* Wed Mar 07 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 0.8.1-1
+- Rebuilt for Ruby 1.9.3
+- Update to version 0.8.1
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.4-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index 8a1a4cb..81a9563 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0312d0043842d9ae909ccd2c28183f1e  httparty-0.7.4.gem
+d78cf931bd64ed195b361b66e0f0da59  httparty-0.8.1.gem


More information about the scm-commits mailing list