Browse files

Use Gem::PackageTask instead of Rake one

Rake::GemPackageTask is deprecated and will be removed.

Gem::PackageTask has been present since RubyGems 1.3.2 and should be
used instead.

rake-compiler already depends on rubygems >= 1.3.5 so no damage done here.
  • Loading branch information...
1 parent dee8683 commit b2229a75693d975cac200888216355005ac8b45f @luislavena luislavena committed Jun 8, 2011
Showing with 2 additions and 3 deletions.
  1. +0 −2 lib/rake/baseextensiontask.rb
  2. +2 −1 lib/rake/extensiontask.rb
View
2 lib/rake/baseextensiontask.rb
@@ -14,8 +14,6 @@
require 'pathname'
module Rake
- autoload :GemPackageTask, 'rake/gempackagetask'
-
class BaseExtensionTask < TaskLib
attr_accessor :name
View
3 lib/rake/extensiontask.rb
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
require 'rake/baseextensiontask'
+require "rubygems/package_task"
# Define a series of tasks to aid in the compilation of C extensions for
# gem developer/creators.
@@ -213,7 +214,7 @@ def define_native_tasks(for_platform = nil, ruby_ver = RUBY_VERSION, callback =
end
# Generate a package for this gem
- gem_package = Rake::GemPackageTask.new(spec) do |pkg|
+ Gem::PackageTask.new(spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end

0 comments on commit b2229a7

Please sign in to comment.