files = Dir.glob(File.join(File.dirname(__FILE__), 'cap_deploy/**/*') ) configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::Configuration.instance(:must_exist) : Capistrano.configuration(:must_exist) configuration.load do files.each{|f| require f } end