Make rake task from gem available everywhere?

后端 未结 5 1957
独厮守ぢ
独厮守ぢ 2020-12-24 07:17

So I\'m writing a small gem and I have a \'/tasks\' dir in it with some specific rake tasks. How do I make those tasks available automatically everywhere, where the gem is r

5条回答
  •  离开以前
    2020-12-24 07:35

    Check out the rdoctask in rake for an example of how to define a task provided by a gem. The task is defined in ruby instead of the rake build language and can be required like so:

    require 'rake'             # the gem
    require 'rake/rdoctask'    # the task
    

提交回复
热议问题