Top Level Namespace

Defined Under Namespace

Modules: RecipesMatic

Instance Method Summary collapse

Instance Method Details

#gem_execute(command) ⇒ Object

Gem execute path



20
21
22
# File 'lib/generators/recipes_matic/templates/config/deploy/recipes/base.rb', line 20

def gem_execute(command)
  execute  "#{fetch(:run_path)}#{command}"
end

#template(from, to) ⇒ Object

Use template



13
14
15
16
17
# File 'lib/generators/recipes_matic/templates/config/deploy/recipes/base.rb', line 13

def template(from, to)
  erb = File.read(File.expand_path("../templates/#{from}", __FILE__))
  File.open(File.expand_path("tmp/temprory"), 'w') { |file| file.write(ERB.new(erb).result(binding)) }
  upload! File.expand_path("tmp/temprory"), to
end