Writing rakefile helpers

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!

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?

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 required.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs