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

Gem PackageTask monkeys to allow for plugins #534

Open
mohawkjohn opened this Issue Jul 25, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@mohawkjohn
Member

mohawkjohn commented Jul 25, 2016

In the Rakefile, there exists this code:

gemspecs.each do |gemspec|
  Gem::PackageTask.new(gemspec).define
end

That's wrong, because it's producing the following line:

rake gem               # Build the gem file nmatrix-0.2.4.gem

but what we really want is:

rake gem:nmatrix               # Build the gem file nmatrix-0.2.4.gem
rake gem:nmatrix_atlas     # ...
rake gem:nmatrix_lapacke # ...
rake gem:nmatrix_fftw # ...

We also want the other relevant package tasks to allow for namespacing like this.

I believe you'd want to make a monkey-patched version of the following file:

https://github.com/rubygems/rubygems/blob/58e2de2ea1f1a78e7548521206863ed3ba0d3e8f/lib/rubygems/package_task.rb

I'd suggest adding a use_namespace: false option, and then change lines like

task :package => [:gem]

to

namespace :package do
  task gem_spec.name.to_sym => [:gem] # this will also need to convert dashes to underscores
end

which should give the desired effect.

We want all of the package tasks to be updated for the plugins. It'd also be great to get a gem push task added so we can quickly send to RubyGems. Yehuda Katz has a how-to on this if you Google for gemspecs and his name.

@wlevine

This comment has been minimized.

Show comment
Hide comment
@wlevine

wlevine Sep 3, 2016

I'm sure I'm the one who wrote this code, but the details are not fresh in my mind. I wrote a blog post on this stuff, so at least I recorded what I was thinking at that time. I don't really understand your objection, though. In practice the code works, right? We can package multiple gems using the Rakefile.

wlevine commented Sep 3, 2016

I'm sure I'm the one who wrote this code, but the details are not fresh in my mind. I wrote a blog post on this stuff, so at least I recorded what I was thinking at that time. I don't really understand your objection, though. In practice the code works, right? We can package multiple gems using the Rakefile.

@mohawkjohn mohawkjohn modified the milestones: v0.2.4, v0.3.0 Dec 20, 2017

@mohawkjohn

This comment has been minimized.

Show comment
Hide comment
@mohawkjohn

mohawkjohn Dec 20, 2017

Member

Bumping this issue up because it's pretty easy to do and would make life hella easier for maintenance tasks.

Member

mohawkjohn commented Dec 20, 2017

Bumping this issue up because it's pretty easy to do and would make life hella easier for maintenance tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment