[packages/ruby-fakeweb] new, version 1.3.0
glen
glen at pld-linux.org
Wed Apr 24 22:11:28 CEST 2013
commit 5ed200e0b57261f00c16e8466d517939c07ecded
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Apr 24 23:10:51 2013 +0300
new, version 1.3.0
based on fedora rubygem-fakeweb package
d270d6a5c6076ba98ce7d1d28e80a0621bb56d7e
patch_out_samuel.patch | 26 ++++++++++++++++++++
ruby-fakeweb.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 91 insertions(+)
---
diff --git a/ruby-fakeweb.spec b/ruby-fakeweb.spec
new file mode 100644
index 0000000..5eca81d
--- /dev/null
+++ b/ruby-fakeweb.spec
@@ -0,0 +1,65 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+
+%define gem_name fakeweb
+Summary: A tool for faking responses to HTTP requests
+Name: ruby-%{gem_name}
+Version: 1.3.0
+Release: 1
+License: MIT
+Group: Development/Languages
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Source0-md5: 6417e2bed496a716e6247fa474796426
+Patch0: patch_out_samuel.patch
+URL: http://github.com/chrisk/fakeweb
+BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.656
+%if %{with tests}
+BuildRequires: ruby-http_connection
+BuildRequires: ruby-minitest
+BuildRequires: ruby-mocha
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+FakeWeb is a helper for faking web requests in Ruby. It works at a
+global level, without modifying code or writing extensive stubs.
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+This package contains documentation for %{name}.
+
+%prep
+%setup -q -n %{gem_name}-%{version}
+cd test
+%patch0 -p0
+cd -
+
+# Don't vendor all your gems...srsly
+mv test/vendor .
+
+%build
+%if %{with tests}
+testrb -Ilib test
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rdoc CHANGELOG LICENSE.txt
+%{ruby_vendorlibdir}/fakeweb.rb
+%{ruby_vendorlibdir}/fake_web.rb
+%{ruby_vendorlibdir}/fake_web
diff --git a/patch_out_samuel.patch b/patch_out_samuel.patch
new file mode 100644
index 0000000..589f53c
--- /dev/null
+++ b/patch_out_samuel.patch
@@ -0,0 +1,26 @@
+--- test_other_net_http_libraries.rb 2010-09-13 13:49:06.007947216 -0400
++++ test_other_net_http_libraries.rb 2010-09-13 13:48:20.239947363 -0400
+@@ -11,15 +11,15 @@
+ `#{ruby_path} #{load_path_opts} -e "#{requires}; #{additional_code}" 2>&1`
+ end
+
+- 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_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
+- output = capture_output_from_requiring %w(fakeweb samuel)
+- assert output.empty?
+- end
++# def test_requiring_samuel_after_fakeweb_does_not_print_warning
++# output = capture_output_from_requiring %w(fakeweb samuel)
++# assert output.empty?
++# end
+
+ def test_requiring_right_http_connection_before_fakeweb_and_then_connecting_does_not_print_warning
+ additional_code = "Net::HTTP.start('example.com')"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-fakeweb.git/commitdiff/5ed200e0b57261f00c16e8466d517939c07ecded
More information about the pld-cvs-commit
mailing list