[rubygem-fakeweb] New Package
Michael Stahnke
stahnma at fedoraproject.org
Sun Sep 19 23:11:35 UTC 2010
commit d421ff129661862b67e526c0ff08ed29b75e0678
Author: stahnma <stahnma at websages.com>
Date: Sun Sep 19 19:11:32 2010 -0400
New Package
.gitignore | 1 +
patch_out_samuel.patch | 26 ++++++++++++
rubygem-fakeweb.spec | 106 ++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 134 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..010b0bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/fakeweb-1.3.0.gem
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')"
diff --git a/rubygem-fakeweb.spec b/rubygem-fakeweb.spec
new file mode 100644
index 0000000..dfcf8bd
--- /dev/null
+++ b/rubygem-fakeweb.spec
@@ -0,0 +1,106 @@
+# Generated from fakeweb-1.3.0.gem by gem2rpm -*- rpm-spec -*-
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname fakeweb
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+
+Summary: A tool for faking responses to HTTP requests
+Name: rubygem-%{gemname}
+Version: 1.3.0
+Release: 3%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://github.com/chrisk/fakeweb
+Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+Patch0: patch_out_samuel.patch
+# Keeping so this spec can be used in EPEL5
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: ruby(abi) = 1.8
+Requires: rubygems
+BuildRequires: rubygems
+BuildRequires(check): rubygem(mocha)
+BuildRequires(check): rubygem(rake)
+BuildRequires(check): rubygem(right_http_connection)
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%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
+mkdir -p ./%{gemdir}
+gem install \
+ --local \
+ --install-dir .%{gemdir} \
+ --force \
+ --rdoc \
+ -V \
+%{SOURCE0}
+
+pushd ./%{geminstdir}/test
+%patch0 -p0
+
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+cp -a ./%{gemdir}/* \
+ %{buildroot}%{gemdir}/
+
+# Don't vendor all your gems...srsly
+rm -rf %{buildroot}%{geminstdir}/test/vendor/right_http*
+rm -rf %{buildroot}%{geminstdir}/test/vendor/samuel*
+
+# rpmlint cleanup
+rm -f %{buildroot}%{geminstdir}/test/vendor/samuel-0.2.1/.gitignore
+rm -f %{buildroot}%{geminstdir}/.autotest
+rm -f %{buildroot}%{geminstdir}/.gitignore
+# This file is also in specifications
+rm -f %{buildroot}%{geminstdir}/*.gemspec
+
+
+%clean
+rm -rf %{buildroot}
+
+%check
+cd %{buildroot}%{geminstdir}
+export RUBYOPT=rubygems
+rake test
+
+%files
+%defattr(-, root, root, -)
+%dir %{geminstdir}
+%doc %{geminstdir}/LICENSE.txt
+%doc %{geminstdir}/README.rdoc
+%doc %{geminstdir}/CHANGELOG
+%{geminstdir}/lib
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+%files doc
+%defattr(-, root, root, -)
+%{gemdir}/doc/%{gemname}-%{version}
+%{geminstdir}/test
+%{geminstdir}/Rakefile
+
+%changelog
+* Fri Sep 17 2010 Michael Stahnke <stahnma at fedoraproject.org> - 1.3.0-3
+- A few minor fixes in spec per review
+
+* Mon Sep 13 2010 Michael Stahnke <stahnma at fedoraproject.org> - 1.3.0-2
+- Removing 'vendored' items
+
+* Sun Sep 12 2010 Michael Stahnke <stahnma at fedoraproject.org> - 1.3.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..0ebe714 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6417e2bed496a716e6247fa474796426 fakeweb-1.3.0.gem
More information about the scm-commits
mailing list