[rubygem-rbvmomi/f21] Update to rbvmomi 1.8.1.

Vít Ondruch vondruch at fedoraproject.org
Thu Jul 17 10:14:25 UTC 2014


commit 4ca99779af5ac39e1c2c245882d74ace5ee46e37
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Jul 17 12:13:59 2014 +0200

    Update to rbvmomi 1.8.1.

 .gitignore                                         |    1 +
 ...i-attributes-workaround-support-for-1.6.x.patch |   32 ++++++++++++
 rubygem-rbvmomi.spec                               |   53 ++++++++++++++------
 sources                                            |    2 +-
 4 files changed, 72 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5e9edc1..92275be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /rbvmomi-1.2.3.gem
+/rbvmomi-1.8.1.gem
diff --git a/rubygem-rbvmomi-1.8.1-nokogiri-attributes-workaround-support-for-1.6.x.patch b/rubygem-rbvmomi-1.8.1-nokogiri-attributes-workaround-support-for-1.6.x.patch
new file mode 100644
index 0000000..27ca283
--- /dev/null
+++ b/rubygem-rbvmomi-1.8.1-nokogiri-attributes-workaround-support-for-1.6.x.patch
@@ -0,0 +1,32 @@
+From 571433c010c073202ace58f7619c0f54f48879e6 Mon Sep 17 00:00:00 2001
+From: Jacob Evans <jacob at dekz.net>
+Date: Fri, 31 Jan 2014 10:56:06 +1000
+Subject: [PATCH] nokogiri attributes workaround support for 1.6.x
+
+---
+ lib/rbvmomi/deserialization.rb | 9 +++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/rbvmomi/deserialization.rb b/lib/rbvmomi/deserialization.rb
+index a245bf2..c5649a4 100644
+--- a/lib/rbvmomi/deserialization.rb
++++ b/lib/rbvmomi/deserialization.rb
+@@ -42,7 +42,14 @@ def initialize conn
+   end
+ 
+   def deserialize node, type=nil
+-    type_attr = node['type']
++    type_attr = node['type']
++
++    # Work around for 1.5.x which doesn't populate node['type']
++    # XXX what changed
++    if node.attributes['type'] and not type_attr
++      type_attr = node.attributes['type'].value
++    end
++
+     type = type_attr if type_attr
+ 
+     if action = BUILTIN_TYPE_ACTIONS[type]
+-- 
+1.9.3
+
diff --git a/rubygem-rbvmomi.spec b/rubygem-rbvmomi.spec
index c55bc0d..3324a6d 100644
--- a/rubygem-rbvmomi.spec
+++ b/rubygem-rbvmomi.spec
@@ -4,18 +4,15 @@
 
 Summary: Ruby interface to the VMware vSphere API
 Name: rubygem-%{gem_name}
-Version: 1.2.3
-Release: 10%{?dist}
+Version: 1.8.1
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
-URL: https://github.com/rlane/rbvmomi
+URL: https://github.com/vmware/rbvmomi
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(release)
-Requires: ruby(rubygems)
-Requires: ruby >= 1.8.7
-Requires: rubygem(nokogiri) >= 1.4.1
-Requires: rubygem(builder)
-Requires: rubygem(trollop)
+# Fix nokogiri 1.6.x compatibility.
+# https://github.com/vmware/rbvmomi/pull/32
+Patch0: rubygem-rbvmomi-1.8.1-nokogiri-attributes-workaround-support-for-1.6.x.patch
 BuildRequires: ruby(release)
 BuildRequires: rubygem(nokogiri) >= 1.4.1
 BuildRequires: rubygem(builder)
@@ -23,7 +20,6 @@ BuildRequires: rubygem(minitest)
 BuildRequires: rubygems-devel
 BuildRequires: ruby >= 1.8.7
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 Ruby interface to the VMware vSphere API
@@ -36,13 +32,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
@@ -56,9 +56,30 @@ cp -a .%{_bindir}/* \
 
 find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
 
+# Fix rpmlint issues.
+sed -i '/#!.*env ruby/d' %{buildroot}%{gem_instdir}/devel/{benchmark,collisions}.rb
+
 %check
-pushd %{buildroot}%{gem_instdir}
-testrb -I lib test/test_*.rb
+pushd .%{gem_instdir}
+# Run the tests using minitest 5.
+ruby -Ilib:test -rminitest/autorun - << \EOF
+  module Kernel
+    alias orig_require require
+    remove_method :require
+
+    def require path
+      orig_require path unless path == 'test/unit'
+    end
+  end
+
+  module Minitest::Assertions
+    alias :assert_raise :assert_raises
+  end
+
+  Test = Minitest
+
+  Dir.glob "./test/**/test_*.rb", &method(:require)
+EOF
 popd
 
 %files
@@ -74,7 +95,6 @@ popd
 
 %files doc
 %doc %{gem_docdir}
-%doc %{gem_instdir}/README.html
 %doc %{gem_instdir}/VERSION
 %doc %{gem_instdir}/README.rdoc
 %{gem_instdir}/devel
@@ -83,6 +103,9 @@ popd
 %{gem_instdir}/Rakefile
 
 %changelog
+* Thu Jul 17 2014 Vít Ondruch <vondruch at redhat.com> - 1.8.1-1
+- Update to rbvmomi 1.8.1.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.3-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -104,7 +127,7 @@ popd
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.3-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
-* Mon Jul 21 2011 Michal Fojtik <mfojtik at redhat.com> - 1.2.3-3
+* Thu Jul 21 2011 Michal Fojtik <mfojtik at redhat.com> - 1.2.3-3
 - Added vmodl.db back, since it's required dependency
 
 * Mon Jul 11 2011 Francesco Vollero <fvollero at redhat.com> - 1.2.3-2
diff --git a/sources b/sources
index c52b8ad..8fdad42 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-558cab8d6ab59cf6d4b02bfa020bd79b  rbvmomi-1.2.3.gem
+a3d00490bad8f9f51c0f111e58db3fae  rbvmomi-1.8.1.gem


More information about the scm-commits mailing list