[rubygem-crack/epel7] Import to EPEL7 branch from F19 branch

tdawson tdawson at fedoraproject.org
Tue Nov 11 20:58:14 UTC 2014


commit b144aa7478838777630684576dd09fe0c05a10d2
Author: Troy Dawson <tdawson at redhat.com>
Date:   Tue Nov 11 14:58:02 2014 -0600

    Import to EPEL7 branch from F19 branch

 rubygem-crack.spec |   61 ++++++++++++++++++++++++++++-----------------------
 sources            |    2 +-
 2 files changed, 34 insertions(+), 29 deletions(-)
---
diff --git a/rubygem-crack.spec b/rubygem-crack.spec
index 6fa8676..dc4bf1b 100644
--- a/rubygem-crack.spec
+++ b/rubygem-crack.spec
@@ -2,16 +2,23 @@
 
 Summary: Really simple JSON and XML parsing, ripped from Merb and Rails
 Name: rubygem-%{gem_name}
-Version: 0.4.2
+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(safe_yaml)
+BuildRequires: rubygem(shoulda)
+BuildRequires: rubygem(jnunemaker-matchy)
+BuildRequires: rubygem(bigdecimal)
 BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}
 #BZ 781829
 Epoch: 1
 
@@ -28,52 +35,50 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
 This package contains documentation for %{name}.
 
 %prep
-%setup -q -c -T
-%gem_install -n %{SOURCE0}
 
 %build
 
 %install
-mkdir -p %{buildroot}%{gem_dir}
-cp -a .%{gem_dir}/* \
-        %{buildroot}%{gem_dir}/
-
-# Fix non-standard-executable-perm rpmlint warning.
-chmod a+x %{buildroot}%{gem_instdir}/script/*
-
+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 .%{gem_instdir}
-ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
+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}
-%exclude %{gem_instdir}/.*
 %doc %{gem_instdir}/LICENSE
-%doc %{gem_instdir}/README.md
+%doc %{gem_instdir}/README.rdoc
 %doc %{gem_instdir}/History
 %{gem_libdir}
 %exclude %{gem_cache}
 %{gem_spec}
 
 %files doc
-%doc %{gem_docdir}
-%{gem_instdir}/Gemfile
-%{gem_instdir}/crack.gemspec
-%{gem_instdir}/script
+%{gem_docdir}
+%{gem_instdir}/Rakefile
 %{gem_instdir}/test
 
 %changelog
-* Mon Jul 14 2014 Vít Ondruch <vondruch at redhat.com> - 1:0.4.2-1
-- Update to crack 0.4.2.
-
-* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:0.3.2-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:0.3.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-
 * Mon Mar 11 2013 Vít Ondruch <vondruch at redhat.com> - 1:0.3.2-1
 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
 - Update to crack 0.3.2.
diff --git a/sources b/sources
index bf2556c..1d32706 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-523723e7f3752848e44dc243003c6dc6  crack-0.4.2.gem
+c575d7a96743eb7dacde51c2ad34567e  crack-0.3.2.gem


More information about the scm-commits mailing list