Skip to content

Commit

Permalink
Use Gem::PackageTask instead of Rake one
Browse files Browse the repository at this point in the history
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
luislavena committed Jun 8, 2011
1 parent dee8683 commit b2229a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/rake/baseextensiontask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
require 'pathname'

module Rake
autoload :GemPackageTask, 'rake/gempackagetask'

class BaseExtensionTask < TaskLib

attr_accessor :name
Expand Down
3 changes: 2 additions & 1 deletion lib/rake/extensiontask.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b2229a7

Please sign in to comment.