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: GitHub - jphastings/sinatra-torrent: Allows you to specify a directory whose contents will be provided as webseeded torrents - 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.