Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with new rubygems? #5

Closed
matthewrudy opened this issue Jun 1, 2011 · 6 comments
Closed

compatibility with new rubygems? #5

matthewrudy opened this issue Jun 1, 2011 · 6 comments

Comments

@matthewrudy
Copy link
Contributor

So it seems the rapid changes to rubygems have rendered gem-this invalid.

RudiMac:rcov_rails matthew$ rake package
rake/gempackagetask is deprecated.  Use rubygems/package_task instead
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from /Users/matthew/code/rcov_rails/Rakefile:25

The offending lines in my gemspec are

require "rake/gempackagetask"
require "rake/rdoctask"

spec = Gem::Specification.new do |s|
  ...
  s.has_rdoc          = true
  s.extra_rdoc_files  = %w(README)
  s.rdoc_options      = %w(--main README)
  ...
end

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end

I'm ignoring the rdoc stuff for now.
And will instead attempt to fix the gem package stuff

Changing the require, and the task class seems to work.

require "rubygems/package_task"

Gem::PackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end

But who knows if this will work in a couple of months time.

@lazyatom
Copy link
Owner

lazyatom commented Jun 3, 2011

Hmm, interesting. I will investigate.

@matthewrudy
Copy link
Contributor Author

I think it may be worth waiting until the war of Rubygems settles down.
But there are definitely a few changes that need to be made if rubygems keeps down its >1.7 route.

Exciting times!

@matthewrudy
Copy link
Contributor Author

It seems actually that this is to do with the new version of rake.
In particular, upgrading my rails 2.3 project to rake 0.9.2 caused similar problems

@lazyatom
Copy link
Owner

Yeah - looks like this is just a rake deprecation thing.

Fixed in 58e1568

On 9 June 2011 06:50, matthewrudy
reply@reply.github.com
wrote:

It seems actually that this is to do with the new version of rake.
In particular, upgrading my rails 2.3 project to rake 0.9.2 caused similar problems

Reply to this email directly or view it on GitHub:
#5 (comment)

@lazyatom
Copy link
Owner

I've just pushed 0.3.7, which includes this fix. Thanks!

@matthewrudy
Copy link
Contributor Author

Works for me.
Interestingly when you run the rake package command on old rubygems you get a helpful;

$ rake package
mv rcov_rails-0.3.1.gem ..
$ ...

which seems to have been a bug.

but in the new rubygems (I'm testing on 1.8.5)
we get nothing (maybe I prefer the bug)

$ rake package
$ ...

looking at the source of the package task it will only be verbose if you pass in a rake --trace

$ rake --trace package
... too much mess ...
Successfully built RubyGem
Name: rcov_rails
Version: 0.3.1
File: rcov_rails-0.3.1.gem
... more mess ...
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants