module Capistrano module RefineryCMS module Helpers def refinerycms_template(template_name) f = File.join(fetch(:refinerycms_template_path), 'template_name') unless File.exists?(f) default_template_path = File.join(%W{ .. .. .. generators capistrano refinerycms templates #{ template_name } }) f = File.expand_path(default_template_path, __FILE__) end template = File.read(f) StringIO.new(ERB.new(template).result(binding)) end end end end