[rubygem-shoulda] Check in rubygem-shoulda

Jeroen van Meeuwen kanarip at fedoraproject.org
Fri Aug 6 19:58:21 UTC 2010


commit 8b898953e6795322a2997581bf2ba9efd6f73375
Author: Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen at ergo-project.org>
Date:   Fri Aug 6 21:58:23 2010 +0200

    Check in rubygem-shoulda

 .gitignore                         |    1 +
 rubygem-shoulda-init.rb            |    1 +
 rubygem-shoulda-tasks_shoulda.rake |    1 +
 rubygem-shoulda.spec               |  101 ++++++++++++++++++++++++++++++++++++
 sources                            |    1 +
 5 files changed, 105 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..392b192 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+shoulda-2.10.2.gem
diff --git a/rubygem-shoulda-init.rb b/rubygem-shoulda-init.rb
new file mode 100644
index 0000000..6dbfa4c
--- /dev/null
+++ b/rubygem-shoulda-init.rb
@@ -0,0 +1 @@
+require File.join(File.dirname(__FILE__), 'rails', 'init')
diff --git a/rubygem-shoulda-tasks_shoulda.rake b/rubygem-shoulda-tasks_shoulda.rake
new file mode 100644
index 0000000..720f27d
--- /dev/null
+++ b/rubygem-shoulda-tasks_shoulda.rake
@@ -0,0 +1 @@
+load File.join(File.dirname(__FILE__), "..", "lib", "shoulda", "tasks.rb")
diff --git a/rubygem-shoulda.spec b/rubygem-shoulda.spec
new file mode 100644
index 0000000..690ebc1
--- /dev/null
+++ b/rubygem-shoulda.spec
@@ -0,0 +1,101 @@
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname shoulda
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+
+Summary:        Making tests easy on the fingers and eyes
+Name:           rubygem-%{gemname}
+Version:        2.10.2
+Release:        2%{?dist}
+Group:          Development/Languages
+License:        MIT
+URL:            http://thoughtbot.com/community/
+Source0:        http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+# The following files are needed for testing, but are not part of the
+# distribution. Here's how you obtain these files:
+# 
+# git clone git://github.com/thoughtbot/shoulda.git
+# cd shoulda
+# git checkout v2.10.2
+# cp tasks/shoulda.rake /path/to/SOURCES/rubygem-%{gemname}-tasks_shoulda.rake
+# cp init.rb /path/to/SOURCES/rubygem-%{gemname}-init.rb
+Source1:        rubygem-%{gemname}-tasks_shoulda.rake
+Source2:        rubygem-%{gemname}-init.rb
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires:       ruby(abi) = 1.8
+Requires:       rubygems
+BuildRequires:  dos2unix
+BuildRequires:  rubygems
+BuildRequires:  rubygem(rake)
+BuildRequires:  rubygem(rails)
+BuildRequires:  ruby(sqlite3)
+BuildRequires:  rubygem(mocha)
+
+BuildArch:      noarch
+Provides:       rubygem(%{gemname}) = %{version}
+
+%description
+Shoulda makes it easy to write elegant, understandable, and
+maintainable tests.  Shoulda consists of test macros, assertions,
+and helpers added on to the Test::Unit framework.  It's fully
+compatible with your existing tests, and requires no retooling
+to use.
+
+
+%prep
+%setup -q -T -c
+mkdir -p ./%{gemdir}
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+gem install --local --install-dir ./%{gemdir} \
+            --force --rdoc %{SOURCE0}
+
+# This task is not part of the distribution but is required for rake test in %%check
+mkdir -p ./%{geminstdir}/tasks
+cp -a %{SOURCE1} ./%{geminstdir}/tasks/%{gemname}.rake
+cp -a %{SOURCE2} ./%{geminstdir}/init.rb
+
+# environment.rb set to use a static Rails version
+sed -i -e 's/^RAILS_GEM_VERSION/#RAILS_GEM_VERSION/g' ./%{geminstdir}/test/rails_root/config/environment.rb
+
+mkdir -p %{buildroot}/%{gemdir}
+cp -a ./%{gemdir}/* %{buildroot}/%{gemdir}/.
+
+mkdir -p %{buildroot}/%{_bindir}
+cp -a %{buildroot}/%{gemdir}/bin/convert_to_should_syntax %{buildroot}/%{_bindir}/convert_to_should_syntax
+rm -rf %{buildroot}/%{gemdir}/bin %{buildroot}/%{geminstdir}/bin
+
+dos2unix %{buildroot}/%{geminstdir}/MIT-LICENSE
+
+%check
+pushd ./%{geminstdir}
+rake test || :
+popd
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%dir %{geminstdir}/
+%doc %{geminstdir}/CONTRIBUTION_GUIDELINES.rdoc
+%doc %{geminstdir}/README.rdoc
+%doc %{geminstdir}/MIT-LICENSE
+%{geminstdir}/Rakefile
+%exclude %{geminstdir}/init.rb
+%{geminstdir}/lib
+%{geminstdir}/rails
+%exclude %{geminstdir}/tasks
+%{geminstdir}/test
+%attr(0644,root,root) %{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%{_bindir}/convert_to_should_syntax
+
+%changelog
+* Sat Jan  9 2010 Jeroen van Meeuwen <j.van.meeuwen at ogd.nl> - 2.10.2-2
+- Fix BuildRequires
+- First package
diff --git a/sources b/sources
index e69de29..cab4cfd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c612a7dfd60cf20f9e383dabc2189aca  shoulda-2.10.2.gem


More information about the scm-commits mailing list