%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname sinatra
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
Summary: Ruby-based web application framework
Name: rubygem-%{gemname}
Version: 1.3.2
Release: 6%{?dist}
Group: Development/Languages
License: MIT
URL: http://sinatra.rubyforge.org
Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = 1.8
Requires: rubygems
Requires: rubygem(rack) >= 1.3.0
Requires: rubygem(rack-protection)
Requires: rubygem(tilt)
BuildRequires: rubygems
BuildRequires: rubygem(rack) >= 1.3.0
BuildRequires: rubygem(rack-test)
BuildRequires: rubygem(rack-protection)
BuildRequires: rubygem(tilt)
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
Epoch: 1
%description
Sinatra is a DSL intended for quickly creating web-applications in Ruby
with minimal effort.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: ruby(rubygems)
%description doc
This package contains documentation for %{name}.
%prep
%setup -q -c -T
%{__mkdir_p} .%{gemdir}
gem install --local --install-dir .%{gemdir} \
--force -V %{SOURCE0}
%build
%check
pushd .%{geminstdir}
%define test_files $(find * -path 'test/*_test.rb' -not -path "test/filter_test.rb" -not -path "test/integration_test.rb" | awk '{ print "-r"$1 }')
ruby -I. -rubygems %{test_files} -e ""
popd
%install
mkdir -p %{buildroot}%{gemdir}
cp -rv .%{gemdir}/* %{buildroot}%{gemdir}
rm %{buildroot}/%geminstdir/.yardopts # Remove YARD configuration
%files
%dir %{geminstdir}
%{geminstdir}/lib
%{geminstdir}/sinatra.gemspec
%{geminstdir}/test
%{geminstdir}/Rakefile
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%files doc
%{gemdir}/doc/%{gemname}-%{version}
%{geminstdir}/README.rdoc
%{geminstdir}/README.*.rdoc
%{geminstdir}/LICENSE
%{geminstdir}/AUTHORS
%{geminstdir}/CHANGES
%{geminstdir}/examples
%{geminstdir}/Gemfile
%changelog
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-6
- Fixed Epoch once again
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-5
- Added Epoch to -dc subpackage
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-4
- Rebuild for missing -dc subpackage
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-3
- Added missing build requires
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-2
- Added tests
- Added doc subpackage
* Mon Jan 02 2012 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-2
- Version bump
* Thu Feb 10 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.6-1
- Version bump
* Thu Feb 10 2011 Michal Fojtik <mfojtik@redhat.com> - 1.2.0-1
- Version bump
* Thu Feb 10 2011 Michal Fojtik <mfojtik@redhat.com> - 1.1.2-3
- Added tilt dependency
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 10 2011 Michal Fojtik <mfojtik@redhat.com> - 1.1.2-1
- Version bump
* Thu Mar 25 2010 Michal Fojtik <mfojtik@redhat.com> - 1.0-1
- Sinatra now uses Tilt for rendering templates
- New helper methods
- New argument to specify the address to bind to
- Speed improvement in rendering templates
* Thu Feb 15 2010 Michal Fojtik <mfojtik@redhat.com> - 0.9.4-2
- Downgrade-Release
* Thu Jan 07 2010 Michal Fojtik <mfojtik@redhat.com> - 0.10.1-1
- Version-Release
- Added jp README
* Fri Jun 26 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.2-3
- Get rid of duplicate files (thanks to Mamoru Tasaka)
* Mon Jun 08 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.2-2
- Fix up documentation list
- Bring tests back
- Depend on ruby(abi)
- Replace defines with globals
* Fri Jun 05 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.2-1
- Package generated by gem2rpm
- Don't ship tests
- Fix up License