Drumherum

bklippstein.github.com/drumherum/frames.html

“Drumherum” is a german word for “the stuff around it”.

$LOAD_PATH management

smart_init finds the directory named 'lib' in your project and adds

  • the (main) directory above

  • the lib-directory itself

to Rubys $LOAD_PATH. So your require statements load the actual version from your (local) project directory, not the (public) gem version.

Also, smart_init sets some release infos for Hoe.

Usage (wherever you are in the directory hierarchy of your project):

if $0 == __FILE__ 
  require 'drumherum'
  smart_init 
end
require 'my-gem-project'   # actual local version, not the gem version
More:smart_init

Rake tasks for DRY release automation

Usage: Instead of require 'rake' use

require 'drumherum/rake'

Tasks:

rake version               # VERSION of the current project and the installed gem
rake publish               # publish gem & docs on github and rubygems, reinstall gem

rake git_publish           # publish current project to github  
rake git_publish_docs      # publish docs to github
rake rubygems_publish      # release actual version to rubygems

More: rake.rb

Hiding and overwriting of rake tasks

Do you want to clean up the messy rake task list? Use hide_tasks to hide unused rake tasks from rake -T.

You hide tasks by clearing their descriptions. After this they still exist, but they are not listed anymore. Usage:

hide_tasks [ :announce, :audit, :check_extra_deps, :clobber_docs, :clobber_package, :default ]

If you want to override a task, you first have to delete it. Use remove_task for it. Usage:

remove_task 'test:plugins'
More:RakeTaskCleanup

Unit Tests

You will see a status display for your tests if you use UnitTest instead of Test::Unit::TestCase: More:UnitTest

Easy development of regular expressions

More: show_regexp

More Info

Disclaimer

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.