Module: Deployment::Methods::Template

Defined in:
lib/depengine/dsl/template.rb

Instance Method Summary collapse

Instance Method Details

#parse_erb_template(source, target, content, options = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/depengine/dsl/template.rb', line 14

def parse_erb_template(source, target, content, options={})
  template           = Processor::Template.new
  template.cdb       = @cdb
  template.basepath  = options[:basepath] || $recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home]
  options[:excludes] = [] if options[:excludes].nil?
  options[:excludes] << '.svn'
   options[:excludes] << '.git'
  template.parse_erb_template(source, content, ::Helper::path_in_deploy_home(target), options)
end

#parse_template(source, target, content, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/depengine/dsl/template.rb', line 4

def parse_template(source, target, content, options={})
  template           = Processor::Template.new
  template.cdb       = @cdb
  template.basepath  = options[:basepath] || $recipe_config[:recipe_base_dir] || $recipe_config[:deploy_home]
  options[:excludes] = [] if options[:excludes].nil?
  options[:excludes] << '.svn'
   options[:excludes] << '.git'
  template.parse_template(source, content, ::Helper::path_in_deploy_home(target), options)
end