diff --git a/rubygem-thor.spec b/rubygem-thor.spec index ba4e93d..5f54c0c 100644 --- a/rubygem-thor.spec +++ b/rubygem-thor.spec @@ -1,8 +1,10 @@ # Generated from thor-0.12.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name thor - %global rubyabi 1.9.1 +# There are not all test dependencies are available in RHEL. +%global enable_test 0%{!?rhel:1} + Summary: Scripting framework that replaces rake, sake and rubigen Name: rubygem-%{gem_name} Version: 0.16.0 @@ -15,10 +17,12 @@ Requires: ruby(rubygems) Requires: ruby(abi) = %{rubyabi} BuildRequires: rubygems-devel BuildRequires: ruby(abi) = %{rubyabi} +%if %{enable_test} > 0 BuildRequires: rubygem(rspec) BuildRequires: rubygem(fakeweb) BuildRequires: rubygem(bundler) BuildRequires: git +%endif BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} @@ -61,6 +65,7 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x find %{buildroot}%{gem_instdir}/bin -type f | \ xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"' +%if %{enable_test} > 0 %check pushd .%{gem_instdir} # kill simplecov dependency @@ -72,6 +77,7 @@ sed -i '166 i\content.force_encoding "UTF-8"' spec/shell/basic_spec.rb rspec spec popd +%endif %files %{_bindir}/thor