require 'couch' require 'rubygems' require 'thor/group' require 'active_support/inflector' module Couch module Actions class Base < Thor::Group include Thor::Actions class_option :database, :type => :string def self.banner "couch #{to_s.split('::').last.underscore}" end private def database options[:database] || Couch.database end def url_for(id) File.join database, id end end end end