seven1m / onebody

OneBody is free, open-source, web-based social networking and online directory software for churches.

This URL has Read+Write access

onebody / lib / cap.rb
100644 19 lines (16 sloc) 0.437 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Capistrano::Configuration
  def render_erb_template(filename)
    template = File.read(filename)
    result = ERB.new(template).result(binding)
  end
  
  def get_db_password
    @db_password ||= HighLine.new.ask('Password to use for the "onebody" MySQL user: ') { |q| q.echo = false }
  end
  
  def run_and_return(cmd)
    output = []
    run cmd do |ch, st, data|
      output << data
    end
    return output.to_s
  end
end