%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: rubygems-devel BuildRequires: rubygem(cucumber) BuildRequires: rubygem(multi_json) 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 # Remove developer-only files for f in .gitignore .travis.yml Gemfile Rakefile gemfiles/*; do rm $f sed -i "s|\"$f\",\?||g" %{gem_name}.gemspec done %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec %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}/spec/ %exclude %{gem_instdir}/%{gem_name}.gemspec %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Tue Jul 29 2014 František Dvořák - 1.1.2-1 - Initial package