[rubygem-openstack] Update to OpenStack 1.1.2.

Vít Ondruch vondruch at fedoraproject.org
Tue Jul 22 08:46:09 UTC 2014


commit f8300813b3db57382a91c558bdf7c66be0c02892
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Tue Jul 22 10:45:57 2014 +0200

    Update to OpenStack 1.1.2.

 .gitignore                                      |    1 +
 rubygem-openstack-1.0.9-fix-failing-tests.patch |   53 -----------------------
 rubygem-openstack-1.1.2-fix-testsuite.patch     |   40 +++++++++++++++++
 rubygem-openstack.spec                          |   38 ++++++++++++----
 sources                                         |    5 +--
 5 files changed, 70 insertions(+), 67 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 34eebc6..b843cf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /openstack-1.0.6.gem
 /openstack-1.0.8.gem
 /openstack-1.0.9.gem
+/openstack-1.1.2.gem
diff --git a/rubygem-openstack-1.1.2-fix-testsuite.patch b/rubygem-openstack-1.1.2-fix-testsuite.patch
new file mode 100644
index 0000000..ceddead
--- /dev/null
+++ b/rubygem-openstack-1.1.2-fix-testsuite.patch
@@ -0,0 +1,40 @@
+diff --git a/test/authentication_test.rb b/test/authentication_test.rb
+index c817274..bcdd79d 100644
+--- a/test/authentication_test.rb
++++ b/test/authentication_test.rb
+@@ -8,7 +8,7 @@ class AuthenticationTest < Test::Unit::TestCase
+     server = mock(:use_ssl= => true, :verify_mode= => true, :start => true, :finish => true)
+     server.stubs(:get).returns(response)
+     Net::HTTP.stubs(:new).returns(server)
+-    connection = stub(:authuser => 'good_user',:authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :service_type=>"compute", :authok= => true, :authtoken= => true, :service_host= => "", :service_path= => "", :service_path => "", :service_port= => "", :service_scheme= => "", :proxy_host => nil, :proxy_port => nil, :api_path => '/foo')
++    connection = stub(:authuser => 'good_user',:authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :service_type=>"compute", :authok= => true, :authtoken= => true, :service_host= => "", :service_path= => "", :service_path => "", :service_port= => "", :service_scheme= => "", :proxy_host => nil, :proxy_port => nil, :api_path => '/foo', :retries => 1)
+     result = OpenStack::Authentication.init(connection)
+     assert_equal result.class, OpenStack::AuthV10
+   end
+@@ -19,7 +19,7 @@ class AuthenticationTest < Test::Unit::TestCase
+     server = mock(:use_ssl= => true, :verify_mode= => true, :start => true)
+     server.stubs(:get).returns(response)
+     Net::HTTP.stubs(:new).returns(server)
+-    connection = stub(:authuser => 'bad_user', :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :authok= => true, :authtoken= => true, :proxy_host => nil, :proxy_port => nil, :api_path => '/foo')
++    connection = stub(:authuser => 'bad_user', :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :authok= => true, :authtoken= => true, :proxy_host => nil, :proxy_port => nil, :api_path => '/foo', :retries => 1)
+     assert_raises(OpenStack::Exception::Authentication) do
+       result = OpenStack::Authentication.init(connection)
+     end
+@@ -27,7 +27,7 @@ class AuthenticationTest < Test::Unit::TestCase
+ 
+   def test_bad_hostname
+     Net::HTTP.stubs(:new).raises(OpenStack::Exception::Connection)
+-    connection = stub(:authuser => 'bad_user', :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :authok= => true, :authtoken= => true, :proxy_host => nil, :proxy_port => nil, :api_path => '/foo')
++    connection = stub(:authuser => 'bad_user', :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v1.0", :authok= => true, :authtoken= => true, :proxy_host => nil, :proxy_port => nil, :api_path => '/foo', :retries => 1, :is_debug => nil)
+     assert_raises(OpenStack::Exception::Connection) do
+       result = OpenStack::Authentication.init(connection)
+     end
+@@ -45,7 +45,7 @@ class AuthenticationTest < Test::Unit::TestCase
+   private
+ 
+   def v2_auth_connection_stub
+-    stub(:authuser => 'good_user', :auth_method => "password",:authtenant => {:type=>"tenantName", :value=>'good_tenant'} , :regions_list => {"North"=> [{:service=>"compute", :versionId=>nil}, {:service=>"nova", :versionId=>nil}], "South"=>[{:service=>"compute", :versionId=>nil}, {:service=>"nova", :versionId=>nil}] }, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v2.0", :authok= => true, :authtoken= => true, :service_host= => "", :service_path= => "", :service_path => "", :service_port= => "", :service_scheme= => "", :proxy_host => nil, :proxy_port => nil, :api_path => '/foo', :service_type => "compute", :service_name => "cloudServers", :region => "South")
++    stub(:authuser => 'good_user', :auth_method => "password",:authtenant => {:type=>"tenantName", :value=>'good_tenant'} , :regions_list => {"North"=> [{:service=>"compute", :versionId=>nil}, {:service=>"nova", :versionId=>nil}], "South"=>[{:service=>"compute", :versionId=>nil}, {:service=>"nova", :versionId=>nil}] }, :authkey => 'bad_key', :auth_host => "a.b.c", :auth_port => "443", :auth_scheme => "https", :auth_path => "/v2.0", :authok= => true, :authtoken= => true, :service_host= => "", :service_path= => "", :service_path => "", :service_port= => "", :service_scheme= => "", :proxy_host => nil, :proxy_port => nil, :api_path => '/foo', :service_type => "compute", :service_name => "cloudServers", :region => "South", :retries => 1)
+   end
+ 
+   def get_test_auth_server
diff --git a/rubygem-openstack.spec b/rubygem-openstack.spec
index 9e030ce..009e9fd 100644
--- a/rubygem-openstack.spec
+++ b/rubygem-openstack.spec
@@ -3,22 +3,20 @@
 
 Summary: Ruby Openstack Compute and Object-Store bindings
 Name: rubygem-%{gem_name}
-Version: 1.0.9
-Release: 4%{?dist}
+Version: 1.1.2
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
 URL: https://github.com/ruby-openstack/ruby-openstack
 Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
-Patch0: rubygem-openstack-1.0.9-fix-failing-tests.patch
-Requires: ruby(release)
-Requires: ruby(rubygems)
-Requires: rubygem(json)
+# Upstream apparently does releases without runnint testsuite :(
+# https://github.com/ruby-openstack/ruby-openstack/pull/40
+Patch0: rubygem-openstack-1.1.2-fix-testsuite.patch
 BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(mocha)
 BuildRequires: rubygem(minitest)
 BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 
@@ -54,13 +52,30 @@ sed -i -e '/^#!\//, 1d' %{buildroot}%{gem_instdir}/lib/openstack.rb
 
 %check
 pushd .%{gem_instdir}
-testrb test/*_test.rb
+# Run the tests using minitest 5.
+ruby -rminitest/autorun -rmocha/setup - << \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_not_nil :refute_nil
+  end
+
+  Test = Minitest
+
+  Dir.glob "./test/**/*_test.rb", &method(:require)
+EOF
 popd
 
 %files
 %dir %{gem_instdir}
 %doc %{gem_instdir}/COPYING
-%{gem_instdir}/VERSION
 %{gem_libdir}
 %exclude %{gem_instdir}/.yardoc
 %exclude %{gem_instdir}/%{gem_name}.gemspec
@@ -73,6 +88,9 @@ popd
 %{gem_instdir}/test
 
 %changelog
+* Mon Jul 21 2014 Vít Ondruch <vondruch at redhat.com> - 1.1.2-1
+- Update to OpenStack 1.1.2.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.9-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -92,7 +110,7 @@ popd
 - Fixed problem with gemspec
 
 * Thu Sep 13 2012 Michal Fojtik <mfojtik at redhat.com> 1.0.5-2
-- Removed %doc prefix from VERSION
+- Removed %%doc prefix from VERSION
 - Removed test-unit dependecy from BuildRequire
 
 * Thu Sep 13 2012 Michal Fojtik <mfojtik at redhat.com> 1.0.5-1
diff --git a/sources b/sources
index d0755bd..059a5c7 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-de64c960ba5f4df9d8d1f40109cd8026  openstack-1.0.5.gem
-6e99f29fd6e2968c63319168329c0612  openstack-1.0.6.gem
-85bf64f1355ad78b9835e89f3b54f0f4  openstack-1.0.8.gem
-444daaf9705df2630a5344a558c75325  openstack-1.0.9.gem
+8c7fabeb140ee8c9d3031e2dc5965a8f  openstack-1.1.2.gem


More information about the scm-commits mailing list