Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

ruby: Use updated package names, but allow fallback to the old names …

…(RHBZ#894545).

Thanks Dominic Cleal.
  • Loading branch information...
commit a0e9d310d1a2bd725c762a485f2b72761bac35df 1 parent d4763a2
rwmjones rwmjones authored

Showing 1 changed file with 18 additions and 3 deletions. Show diff stats Hide diff stats

  1. +18 3 ruby/Rakefile.in
21 ruby/Rakefile.in
@@ -17,9 +17,24 @@
17 17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 18
19 19 require 'rake/clean'
20   -require 'rake/rdoctask'
21 20 require 'rake/testtask'
22   -require 'rake/gempackagetask'
  21 +
  22 +# Used to be rake/rdoctask. Now it's rdoc/task.
  23 +begin
  24 + require 'rdoc/task'
  25 +rescue
  26 + require 'rake/rdoctask'
  27 +end
  28 +
  29 +# Used to be rake/gempackagetask. Now it's rubygems/package_task. Also
  30 +# we need to use the appropriate class name below.
  31 +begin
  32 + require 'rubygems/package_task'
  33 + gempackagetask='Gem::PackageTask'
  34 +rescue
  35 + require 'rake/gempackagetask'
  36 + gempackagetask='Rake::GemPackageTask'
  37 +end
23 38
24 39 PKG_NAME='@PACKAGE_NAME@'
25 40 PKG_VERSION='@PACKAGE_VERSION@'
@@ -108,7 +123,7 @@ Ruby bindings for libguestfs.
108 123 EOF
109 124 end
110 125
111   -Rake::GemPackageTask.new(SPEC) do |pkg|
  126 +eval(gempackagetask).new(SPEC) do |pkg|
112 127 pkg.need_tar = true
113 128 pkg.need_zip = true
114 129 end

0 comments on commit a0e9d31

Please sign in to comment.
Something went wrong with that request. Please try again.