Writing rakefile helpers

J

Jp Hastings-spital

I've written an extension for Sinatra, I'd like people to be able to
include some of my code in their rakefile so they can perform my tasks
automatically in their webapp. (I think this would be something like
pitting .rake files in lib/tasks for rails)

At the moment I've written lib/sinatra/myextension/rake_helper.rb and
ask users of my gem to require it to get the extra functionality, but is
there a more 'right' way of doing this?

Thanks!
 
A

Anurag Priyam

I've written an extension for Sinatra, I'd like people to be able to
include some of my code in their rakefile so they can perform my tasks
automatically in their webapp. (I think this would be something like
pitting .rake files in lib/tasks for rails)

Umm, link?
 
J

Jp Hastings-spital

Umm, link?

I abstracted in my question above, but you can see the code it concerns
here: https://github.com/jphastings/sinatra-torrent - the readme
slsection on rake explains my as-is method.

My rakefile include is in lib/sinatra/torrent/hashing.rb - it adds a
namespace and tasks as it's `require`d.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top