%global gem_name crack Summary: Really simple JSON and XML parsing, ripped from Merb and Rails Name: rubygem-%{gem_name} Version: 0.3.2 Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://github.com/jnunemaker/crack Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem # Keeping buildroot so I can use the same spec in EPEL5 Requires: ruby(rubygems) Requires: rubygem(bigdecimal) Requires: ruby(release) BuildRequires: rubygems-devel BuildRequires: rubygem(minitest) BuildRequires: rubygem(shoulda) BuildRequires: rubygem(jnunemaker-matchy) BuildRequires: rubygem(bigdecimal) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} #BZ 781829 Epoch: 1 %description Really simple JSON and XML parsing, ripped from Merb and Rails. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{epoch}:%{version}-%{release} %description doc This package contains documentation for %{name}. %prep %build %install rm -rf %{buildroot} %gem_install -n %{SOURCE0} -d %{buildroot}%{gem_dir} rm -f %{buildroot}%{gem_instdir}/.gitignore rm -f %{buildroot}%{gem_instdir}/*.gemspec %check pushd %{buildroot}%{gem_instdir} # These tests are not going to work in newer Ruby and it doesn't look like # crack could be fixed. # http://bugs.ruby-lang.org/issues/4479 sed -i '/a: "2007-01-01 01:12:34 Z"/ s/^/#/' test/json_test.rb sed -i '/a: "2007-01-01T01:12:34Z"/ s/^/#/' test/json_test.rb sed -i '/a: "2007-01-01 01:12:34"/ s/^/#/' test/json_test.rb # Properly catch Psych parsing errors. # https://github.com/jnunemaker/crack/pull/32 sed -i -r 's/(rescue ArgumentError)( => e)/\1, Psych::SyntaxError\2/' lib/crack/json.rb # The RUBYOPT temporary fixes "NameError: uninitialized constant # REXML::Text::Document", until it is fixed in Ruby. # https://bugs.ruby-lang.org/issues/7961 RUBYOPT=-rrexml/document testrb test/*_test.rb popd %files %dir %{gem_instdir} %doc %{gem_instdir}/LICENSE %doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/History %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %{gem_docdir} %{gem_instdir}/Rakefile %{gem_instdir}/test %changelog * Mon Mar 11 2013 Vít Ondruch - 1:0.3.2-1 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 - Update to crack 0.3.2. * Thu Feb 14 2013 Fedora Release Engineering - 1:0.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 1:0.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Mar 14 2012 Bohuslav Kabrda - 1:0.3.1-3 - Properly require the main package (with epoch) from the -doc subpackage. * Wed Mar 07 2012 Bohuslav Kabrda - 1:0.3.1-2 - Update to 0.3.1 * Sun Feb 05 2012 - 0.1.8-5 - Revert back to 0.1.8 as HTTParty can't use crack > 0.1.8 * Wed Dec 28 2011 - 0.3.1-1 - Update to 0.3.1 - Fix bz #715704 * Thu Nov 10 2011 Michael Stahnke - 0.1.8-3 - rebuilt * Wed Feb 09 2011 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Aug 23 2010 Michael Stahnke - 0.1.8-1 - Broke package into main and doc - Added tests