%global gem_name json_spec Name: rubygem-%{gem_name} Version: 1.1.2 Release: 1%{?dist} Summary: Easily handle JSON in RSpec and Cucumber Group: Development/Languages License: MIT URL: https://github.com/collectiveidea/json_spec Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildArch: noarch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: rubygem(cucumber) BuildRequires: rubygem(rspec) %description RSpec matchers and Cucumber steps for testing JSON content. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} rspec -Ilib spec cucumber --tags ~@fail popd %files %doc %{gem_instdir}/LICENSE.txt %doc %{gem_instdir}/README.md %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_cache} %exclude %{gem_instdir}/features/ %exclude %{gem_instdir}/gemfiles/ %exclude %{gem_instdir}/spec/ %exclude %{gem_instdir}/.gitignore %exclude %{gem_instdir}/.travis.yml %exclude %{gem_instdir}/Gemfile* %exclude %{gem_instdir}/Rakefile %exclude %{gem_instdir}/%{gem_name}.gemspec %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Thu Jul 03 2014 František Dvořák - 1.1.2-1 - Initial package