Simple examples of how to write Hoe plugins. Questions? Weirdness? Fork, add questions to the README, and send me a pull request: I’ll do my best to answer them with an example.
Remove the plugin’s symbol from the Hoe.plugins
array before calling Hoe.spec
.
# I don't release to RubyForge! Ha! Hoe.plugins.delete :rubyforge
Take a look at lib/hoe/omnibus.rb
. It activates two other plugins, :first
and :second
. It’s used in the top-level Rakefile
:
Hoe.plugin :omnibus
Only files for plugins explicitly activated by Hoe.plugin
get loaded, but plugin files can activate other plugins without any problems.
You can’t! Early versions of the Hoe plugin architecture allowed you to do this, but it’s too easy for plugins to infect unsuspecting Rakefiles. Explicitly activate the plugins your Rakefile needs with Hoe.plugin
.
Copyright 2009 John Barnette ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.