incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 1/2] client: build only one gem for both JRuby and MRI
Date Fri, 22 Oct 2010 22:52:56 GMT
From: David Lutterkort <lutter@redhat.com>

Bump the requirement for Nokogiri to one that also works under JRuby. Also
bump rest-client requirement, since tests fail with rest-client 1.4.2
---
 client/Rakefile                  |   12 +++---------
 client/deltacloud-client.gemspec |   12 +++---------
 2 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/client/Rakefile b/client/Rakefile
index 2f465be..947525e 100644
--- a/client/Rakefile
+++ b/client/Rakefile
@@ -25,15 +25,9 @@ task 'documentation' do
   load 'lib/documentation.rb'
 end
 
-@specs = ['ruby', 'java'].inject({}) do |hash, spec_platform|
-  $platform = spec_platform
-  hash.update(spec_platform => Gem::Specification.load('deltacloud-client.gemspec'))
-end
-
-@specs.values.each do |spec|
-  Rake::GemPackageTask.new(spec) do |pkg|
-    pkg.need_tar = true
-  end
+spec = Gem::Specification.load('deltacloud-client.gemspec')
+Rake::GemPackageTask.new(spec) do |pkg|
+  pkg.need_tar = true
 end
 
 if Gem.available?('rspec')
diff --git a/client/deltacloud-client.gemspec b/client/deltacloud-client.gemspec
index 110ad83..aba7769 100644
--- a/client/deltacloud-client.gemspec
+++ b/client/deltacloud-client.gemspec
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
   s.email = 'deltacloud-users@lists.fedorahosted.org'
   s.name = 'deltacloud-client'
   s.description = %q{Deltacloud REST Client for API}
-  s.version = '0.0.9.8'
+  s.version = '0.0.9.9'
   s.summary = %q{Deltacloud REST Client}
   s.files = Dir['Rakefile', 'lib/**/*.rb', 'init.rb', 'bin/deltacloudc']
   s.bindir = 'bin'
@@ -32,13 +32,7 @@ Gem::Specification.new do |s|
   s.test_files= Dir.glob("specs/**/**")
   s.extra_rdoc_files = Dir["COPYING"]
 
-  # Rakefile needs to create spec for both platforms (ruby and java), using the
-  # $platform global variable. In all other cases, we figure it out from
-  # RUBY_PLATFORM.
-  s.platform = $platform || RUBY_PLATFORM[/java/] || 'ruby'
-
-  s.add_dependency('rest-client', '>= 1.4.2')
-  s.add_dependency('nokogiri', '>= 1.4.1') if s.platform.to_s == 'ruby'
-  s.add_dependency('nokogiri', '>= 1.5.0.beta.2') if s.platform.to_s == 'java'
+  s.add_dependency('rest-client', '>= 1.6.1')
+  s.add_dependency('nokogiri', '>= 1.4.3')
   s.add_development_dependency('rspec', '>= 1.3.0')
 end
-- 
1.7.2.3


Mime
View raw message