[rubygem-openstack] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

Bohuslav Kabrda bkabrda at fedoraproject.org
Tue Mar 19 09:28:57 UTC 2013


commit 746ac309504d560be9479260bc0fb0ac74022cb0
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Tue Mar 19 08:30:27 2013 +0100

    Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

 rubygem-openstack-1.0.9-fix-failing-tests.patch |   53 +++++++++++++++++++++++
 rubygem-openstack.spec                          |   19 +++++---
 2 files changed, 65 insertions(+), 7 deletions(-)
---
diff --git a/rubygem-openstack-1.0.9-fix-failing-tests.patch b/rubygem-openstack-1.0.9-fix-failing-tests.patch
new file mode 100644
index 0000000..89bc62e
--- /dev/null
+++ b/rubygem-openstack-1.0.9-fix-failing-tests.patch
@@ -0,0 +1,53 @@
+commit e627d60064b56b0f52b57c7fee6a0aa67c278247
+Author: marios <marios at redhat.com>
+Date:   Thu Feb 21 15:28:34 2013 +0200
+
+    Fix Failing tests - required for rpm packaging for deltacloud 1.1.1
+    
+    http://kojipkgs.fedoraproject.org//work/tasks/9300/5039300/build.log
+
+diff --git a/test/authentication_test.rb b/test/authentication_test.rb
+index 4f3d612..c817274 100644
+--- a/test/authentication_test.rb
++++ b/test/authentication_test.rb
+@@ -33,35 +33,21 @@ class AuthenticationTest < Test::Unit::TestCase
+     end
+   end
+ 
+-  def test_service_region
++  def test_service_uri
+     server = get_test_auth_server
+     Net::HTTP.stubs(:new).returns(server)
+     server.stubs(:started?).returns(true)
+-    connection = stub(:authuser => 'good_user', :auth_method => "password",:authtenant => {:type=>"tenantName", :value=>'good_tenant'} , :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")
++    connection = v2_auth_connection_stub
+     result = OpenStack::Authentication.init(connection)
+     assert_equal("compute.south.host", result.uri.host)
+   end
+ 
+-  def test_service_name
+-    server = get_test_auth_server
+-    Net::HTTP.stubs(:new).returns(server)
+-    server.stubs(:started?).returns(true)
+-    connection = stub(:authuser => 'good_user', :auth_method=>"password", :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :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 => "nova", :service_name => "cloudCompute", :region => "South")
+-    result = OpenStack::Authentication.init(connection)
+-    assert_equal("nova.south.host", result.uri.host)
+-  end
++  private
+ 
+-  def test_service_type
+-    server = get_test_auth_server
+-    Net::HTTP.stubs(:new).returns(server)
+-    server.stubs(:started?).returns(true)
+-    connection = stub(:authuser => 'good_user', :auth_method => "password", :authtenant => {:type=>"tenantName", :value=>'good_tenant'}, :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 => "nova", :service_name => nil, :region => "North")
+-    result = OpenStack::Authentication.init(connection)
+-    assert_equal("nova.north.host", result.uri.host)
++  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")
+   end
+ 
+-
+-  private
+   def get_test_auth_server
+     json_response = %{{
+         "access":{
diff --git a/rubygem-openstack.spec b/rubygem-openstack.spec
index 9b2466e..90a5c53 100644
--- a/rubygem-openstack.spec
+++ b/rubygem-openstack.spec
@@ -1,19 +1,19 @@
 %global gem_name openstack
 
-%global rubyabi 1.9.1
 
 Summary: Ruby Openstack Compute and Object-Store bindings
 Name: rubygem-%{gem_name}
 Version: 1.0.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Development/Languages
 License: MIT
 URL: https://github.com/ruby-openstack/ruby-openstack
 Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
-Requires: ruby(abi) = %{rubyabi}
+Patch0: rubygem-openstack-1.0.9-fix-failing-tests.patch
+Requires: ruby(release)
 Requires: ruby(rubygems)
 Requires: rubygem(json)
-BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(mocha)
 BuildRequires: rubygem(minitest)
@@ -36,9 +36,11 @@ Documentation for %{name}
 
 %prep
 %setup -q -c -T
-mkdir -p .%{gem_dir}
-gem install --local --install-dir .%{gem_dir} \
-            --force %{SOURCE0}
+%gem_install -n %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
 
 %build
 
@@ -71,6 +73,9 @@ popd
 %{gem_instdir}/test
 
 %changelog
+* Tue Mar 19 2013 Bohuslav Kabrda <bkabrda at redhat.com> - 1.0.9-2
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
 * Wed Feb 13 2013 Michal Fojtik <mfojtik at redhat.com> 1.0.9-1
 - Version bump
 


More information about the scm-commits mailing list