From 9f791d2a971b7b1d42702b11b842298ee3adbba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 11 Mar 2013 12:20:32 +0100 Subject: [PATCH] Update to crack 0.3.2. --- .gitignore | 1 + rubygem-crack.spec | 39 ++++++++++++++++++++++----------------- sources | 2 +- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 478ffcc..815352a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /crack-0.1.8.gem /crack-0.3.1.gem +/crack-0.3.2.gem diff --git a/rubygem-crack.spec b/rubygem-crack.spec index 4481b25..dc4bf1b 100644 --- a/rubygem-crack.spec +++ b/rubygem-crack.spec @@ -2,14 +2,13 @@ Summary: Really simple JSON and XML parsing, ripped from Merb and Rails Name: rubygem-%{gem_name} -Version: 0.3.1 -Release: 6%{?dist} +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 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ruby(rubygems) Requires: rubygem(bigdecimal) Requires: ruby(release) @@ -41,42 +40,48 @@ This package contains documentation for %{name}. %install rm -rf %{buildroot} -mkdir -p %{buildroot}%{gem_dir} -%gem_install -n %{SOURCE0} +%gem_install -n %{SOURCE0} -d %{buildroot}%{gem_dir} rm -f %{buildroot}%{gem_instdir}/.gitignore rm -f %{buildroot}%{gem_instdir}/*.gemspec %check -# Packages required to run a rake test not availble yet in Fedora pushd %{buildroot}%{gem_instdir} -sed -i 's/require File/#require File/g' Rakefile -sed -i '10 a\ -YAML::ENGINE.yamler = "syck"' test/test_helper.rb -testrb test/*_test.rb -popd -%clean -rm -rf %{buildroot} +# 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 -%defattr(-, root, root, -) %dir %{gem_instdir} %doc %{gem_instdir}/LICENSE %doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/History %{gem_libdir} -%{gem_cache} +%exclude %{gem_cache} %{gem_spec} %files doc -%defattr(-, root, root, -) %{gem_docdir} %{gem_instdir}/Rakefile %{gem_instdir}/test %changelog -* Fri Mar 08 2013 Vít Ondruch - 1:0.3.1-6 +* 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 diff --git a/sources b/sources index 0577921..1d32706 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -73bf73388ebac555be0318fcac776911 crack-0.3.1.gem +c575d7a96743eb7dacde51c2ad34567e crack-0.3.2.gem