[rubygem-multi_xml] Update to MultiXML 0.5.5.

Vít Ondruch vondruch at fedoraproject.org
Tue Feb 24 08:34:50 UTC 2015


commit 3f5cbb6ebd9cd107abdc3fbab1dce51a3b638089
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Tue Feb 24 09:34:37 2015 +0100

    Update to MultiXML 0.5.5.

 .gitignore                                         |  1 +
 ...gem-multi_xml-0.5.5-Prepare-for-rspec-3-0.patch | 58 ++++++++++++++++++++++
 rubygem-multi_xml.spec                             | 41 ++++++++++-----
 sources                                            |  2 +-
 4 files changed, 89 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bbc3454..b7b63a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /multi_xml-0.4.1.gem
 /multi_xml-0.5.2.gem
+/multi_xml-0.5.5.gem
diff --git a/rubygem-multi_xml-0.5.5-Prepare-for-rspec-3-0.patch b/rubygem-multi_xml-0.5.5-Prepare-for-rspec-3-0.patch
new file mode 100644
index 0000000..5a093c9
--- /dev/null
+++ b/rubygem-multi_xml-0.5.5-Prepare-for-rspec-3-0.patch
@@ -0,0 +1,58 @@
+From a4ae6aa9810ab44634df977f9d0d37efb785c45c Mon Sep 17 00:00:00 2001
+From: Erik Michaels-Ober <sferik at gmail.com>
+Date: Sat, 9 Nov 2013 07:29:35 -0500
+Subject: [PATCH] Prepare for rspec 3.0
+
+---
+ spec/parser_shared_example.rb | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/spec/parser_shared_example.rb b/spec/parser_shared_example.rb
+index 82d1645..f3dbd00 100644
+--- a/spec/parser_shared_example.rb
++++ b/spec/parser_shared_example.rb
+@@ -145,7 +145,7 @@
+           context "when #{boolean}" do
+             it "returns #{boolean}" do
+               xml = "<tag type=\"boolean\">#{boolean}</tag>"
+-              expect(MultiXml.parse(xml)['tag']).to instance_eval("be_#{boolean}")
++              expect(MultiXml.parse(xml)['tag']).to be instance_eval(boolean)
+             end
+           end
+         end
+@@ -156,7 +156,7 @@
+           end
+ 
+           it "returns true" do
+-            expect(MultiXml.parse(@xml)['tag']).to be_true
++            expect(MultiXml.parse(@xml)['tag']).to be true
+           end
+         end
+ 
+@@ -166,7 +166,7 @@
+           end
+ 
+           it "returns false" do
+-            expect(MultiXml.parse(@xml)['tag']).to be_false
++            expect(MultiXml.parse(@xml)['tag']).to be false
+           end
+         end
+       end
+@@ -428,7 +428,7 @@
+           end
+ 
+           it "returns nil" do
+-            expect(MultiXml.parse(@xml)['tag']).to be_nil
++            expect(MultiXml.parse(@xml)['tag']).to be nil
+           end
+         end
+       end
+@@ -444,7 +444,7 @@
+           end
+ 
+           it "returns nil when the type is allowed" do
+-            expect(MultiXml.parse(@xml, :disallowed_types => [])['tag']).to be_nil
++            expect(MultiXml.parse(@xml, :disallowed_types => [])['tag']).to be nil
+           end
+         end
+       end
diff --git a/rubygem-multi_xml.spec b/rubygem-multi_xml.spec
index 5cb16f0..2583149 100644
--- a/rubygem-multi_xml.spec
+++ b/rubygem-multi_xml.spec
@@ -3,21 +3,24 @@
 
 Summary: A generic swappable back-end for XML parsing
 Name: rubygem-%{gem_name}
-Version: 0.5.2
-Release: 5%{?dist}
+Version: 0.5.5
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
 URL: https://github.com/sferik/multi_xml
-Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(release)
-Requires: ruby(rubygems)
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# RSpec 3.x fixes.
+# https://github.com/sferik/multi_xml/commit/a4ae6aa9810ab44634df977f9d0d37efb785c45c
+Patch0: rubygem-multi_xml-0.5.5-Prepare-for-rspec-3-0.patch
 BuildRequires: ruby
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(rspec)
 BuildRequires: rubygem(nokogiri)
+# rubygem-ox is not yet in Fedora.
+# https://bugzilla.redhat.com/show_bug.cgi?id=1142491
+# BuildRequires: rubygem(ox)
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 A gem to provide swappable XML backends utilizing LibXML, Nokogiri, Ox, or
@@ -31,13 +34,17 @@ Requires: %{name} = %{version}-%{release}
 BuildArch: noarch
 
 %description doc
-Documentation for %{name}
+Documentation for %{name}.
 
 
 %prep
 %setup -q -c -T
 %gem_install -n %{SOURCE0}
 
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
+
 %build
 
 %install
@@ -49,30 +56,40 @@ cp -a .%{gem_dir}/* \
 
 %check
 pushd .%{gem_instdir}
-# Define CI environment variable to ignore SimpleCov dependency.
-CI=1 rspec spec
+# We don't care about code coverage.
+sed -i '/simplecov/,/SimpleCov\.start/ s/^/#/' spec/helper.rb
+
+# Ox is the most prefered XML parser by MultiXML. This would succeed if there
+# were Ox in Fedora.
+sed -i "/expect(MultiXml\.parser\.name)\.to eq('MultiXml::Parsers::Ox')/ s/Ox/Nokogiri/" \
+  spec/multi_xml_spec.rb
+
+rspec spec
 popd
 
 %files
 %dir %{gem_instdir}
 %{gem_libdir}
 %exclude %{gem_instdir}/.*
-%{gem_cache}
+%exclude %{gem_cache}
 %{gem_spec}
 %doc %{gem_instdir}/README.md
-%doc %{gem_instdir}/LICENSE.md
+%license %{gem_instdir}/LICENSE.md
 
 
 %files doc
 %doc %{gem_docdir}
 %{gem_instdir}/spec
+%doc %{gem_instdir}/CHANGELOG.md
 %doc %{gem_instdir}/CONTRIBUTING.md
 %{gem_instdir}/Rakefile
 %{gem_instdir}/*.gemspec
-%{gem_instdir}/Gemfile
 
 
 %changelog
+* Tue Feb 24 2015 Vít Ondruch <vondruch at redhat.com> - 0.5.5-1
+- Update to MultiXML 0.5.5.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index b52a8c3..57a3340 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d979898dde2847e985fc2060843fe50c  multi_xml-0.5.2.gem
+afecb8240f7a14a9183d79f8df5bfa3f  multi_xml-0.5.5.gem


More information about the scm-commits mailing list