Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rake 0.9.2 deprecates these tasks.

Thankfully, the changes seem to work on Rake 0.8.7 anyway.
  • Loading branch information...
commit 58e15684e0c0f81c25684bc572bfc97f2859b495 1 parent e86fd79
@lazyatom authored
Showing with 10 additions and 9 deletions.
  1. +4 −4 Rakefile
  2. +4 −4 Rakefile.erb
  3. +2 −1  test/test_helper.rb
View
8 Rakefile
@@ -1,6 +1,6 @@
require "rubygems"
-require "rake/gempackagetask"
-require "rake/rdoctask"
+require "rubygems/package_task"
+require "rdoc/task"
task :default => :test
@@ -55,7 +55,7 @@ end
# .gemspec file, which is useful if something (i.e. GitHub) will
# be automatically building a gem for this project. If you're not
# using GitHub, edit as appropriate.
-Rake::GemPackageTask.new(spec) do |pkg|
+Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
@@ -68,7 +68,7 @@ end
task :package => :gemspec
# Generate documentation
-Rake::RDocTask.new do |rd|
+RDoc::Task.new do |rd|
rd.main = "Readme.markdown"
rd.rdoc_files.include("Readme.markdown", "lib/**/*.rb")
rd.rdoc_dir = "rdoc"
View
8 Rakefile.erb
@@ -1,6 +1,6 @@
require "rubygems"
-require "rake/gempackagetask"
-require "rake/rdoctask"
+require "rubygems/package_task"
+require "rdoc/task"
<% if using_rspec? %>
require "rspec"
@@ -100,7 +100,7 @@ end
#
# To publish your gem online, install the 'gemcutter' gem; Read more
# about that here: http://gemcutter.org/pages/gem_docs
-Rake::GemPackageTask.new(spec) do |pkg|
+Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
@@ -118,7 +118,7 @@ end
task :package => :gemspec
# Generate documentation
-Rake::RDocTask.new do |rd|
+RDoc::Task.new do |rd|
<% if readme %>rd.main = "<%= readme %>"<% end %>
rd.rdoc_files.include(<%= %{"#{readme}", } if readme %>"lib/**/*.rb")
rd.rdoc_dir = "rdoc"
View
3  test/test_helper.rb
@@ -5,6 +5,7 @@
require 'yaml'
require 'timeout'
require 'rake'
+require 'gem_this'
class GemBuilder
attr_reader :gem_path
@@ -30,7 +31,7 @@ def path_to_gem
def build
result = nil
FileUtils.cd(@gem_path) do
- result = GemThis.new(@name, :debug => false, :silent => true).create_rakefile
+ result = ::GemThis.new(@name, :debug => false, :silent => true).create_rakefile
`rake package 2>&1`
end
result
Please sign in to comment.
Something went wrong with that request. Please try again.