[rubygem-shoulda] new version.
Michael Stahnke
stahnma at fedoraproject.org
Tue Sep 7 15:09:03 UTC 2010
commit 86b835857b70e1a610d410f3d04a743c494fb719
Author: stahnma <stahnma at websages.com>
Date: Tue Sep 7 15:09:06 2010 +0000
new version.
.gitignore | 1 +
rubygem-shoulda.spec | 146 +++++++++++++++++++++++++++++---------------------
sources | 2 +-
3 files changed, 87 insertions(+), 62 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 392b192..0d4c056 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
shoulda-2.10.2.gem
+shoulda-2.11.3.gem
diff --git a/rubygem-shoulda.spec b/rubygem-shoulda.spec
index 690ebc1..31e26f2 100644
--- a/rubygem-shoulda.spec
+++ b/rubygem-shoulda.spec
@@ -1,101 +1,125 @@
%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
+%global railsver %(gem list rails | grep rails | cut -d\\( -f2 | cut -d\\) -f1 | head -1 )
+
+Summary: Making tests easy on the fingers and eyes
+Name: rubygem-%{gemname}
+Version: 2.11.3
+Release: 1%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://thoughtbot.com/community/
+Source0: http://rubygems.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}
+# git checkout v2.11.3 # the version
+# cp tasks/shoulda.rake /path/to/SOURCES/rubygem-shoulda-tasks_shoulda.rake
+# cp init.rb /path/to/SOURCES/rubygem-shoulda-init.rb
+Source1: rubygem-shoulda-tasks_shoulda.rake
+Source2: rubygem-shoulda-init.rb
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: rubygems
+Requires: ruby(abi) = 1.8
+BuildRequires: rubygems
+BuildRequires: dos2unix
+BuildRequires(check): rubygem(cucumber)
+BuildRequires(check): rubygem(rake)
+BuildRequires(check): rubygem(rails) < 3
+BuildRequires(check): rubygem(sqlite3-ruby)
+BuildRequires(check): 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.
+Making tests easy on the fingers and eyes
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}.
+
%prep
-%setup -q -T -c
-mkdir -p ./%{gemdir}
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
-gem install --local --install-dir ./%{gemdir} \
+gem install --local --install-dir %{buildroot}%{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
+mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
+rmdir %{buildroot}%{gemdir}/bin
+find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
+# Notified upstream of lack of ability to run tests after running gem install
+# on Sep 03, 2010. Not holding my breath.
+
+# This task is not part of the distribution but is required for rake test in %%check
+mkdir -p %{buildroot}%{geminstdir}/tasks
+cp -a -p %{SOURCE1} %{buildroot}%{geminstdir}/tasks/%{gemname}.rake
+# This is also not part of dist gem, but needed for tests
+cp -a -p %{SOURCE2} %{buildroot}%{geminstdir}/init.rb
+# This is also not part of dist gem, but needed for tests
+cp -a -p %{buildroot}/%{gemdir}/specifications/* %{buildroot}%{geminstdir}/shoulda.gemspec
+
+# environment.rb set to use a static Rails version -- it's not pretty, but it works
+echo 'RAILS_GEM_VERSION="%{railsver}" ' > %{buildroot}%{geminstdir}/test/rails2_root/config/environment.tmp.rb
+cat %{buildroot}%{geminstdir}/test/rails2_root/config/environment.rb >> %{buildroot}%{geminstdir}/test/rails2_root/config/environment.tmp.rb
+mv -f %{buildroot}%{geminstdir}/test/rails2_root/config/environment.tmp.rb %{buildroot}%{geminstdir}/test/rails2_root/config/environment.rb
+
+# Fix end-of-line encoding
dos2unix %{buildroot}/%{geminstdir}/MIT-LICENSE
-%check
-pushd ./%{geminstdir}
-rake test || :
-popd
+
%clean
rm -rf %{buildroot}
+%check
+cd %{buildroot}%{geminstdir}
+rake test
+
%files
%defattr(-, root, root, -)
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%dir %{geminstdir}/
-%doc %{geminstdir}/CONTRIBUTION_GUIDELINES.rdoc
+%{_bindir}/convert_to_should_syntax
+%dir %{geminstdir}
%doc %{geminstdir}/README.rdoc
%doc %{geminstdir}/MIT-LICENSE
-%{geminstdir}/Rakefile
-%exclude %{geminstdir}/init.rb
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%{geminstdir}/lib
+%{geminstdir}/bin
%{geminstdir}/rails
-%exclude %{geminstdir}/tasks
+
+%files doc
+%defattr(-, root, root, -)
+%{geminstdir}/tasks
+%{geminstdir}/init.rb
+%{geminstdir}/*.gemspec
+%{gemdir}/doc/%{gemname}-%{version}
+%{geminstdir}/CONTRIBUTION_GUIDELINES.rdoc
%{geminstdir}/test
-%attr(0644,root,root) %{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-%{_bindir}/convert_to_should_syntax
+%{geminstdir}/Rakefile
+
+
%changelog
+* Wed Sep 01 2010 Michael Stahnke <stahnma at fedoraproject.org> - 2.11.3-1
+- New version
+- Fix many broken tests
+- Split into -doc package
+
* 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 cab4cfd..70ba496 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c612a7dfd60cf20f9e383dabc2189aca shoulda-2.10.2.gem
+ca0b3d188a6e4bc3a39731b182fa8efb shoulda-2.11.3.gem
More information about the scm-commits
mailing list