class Object

Public Instance Methods

gem_execute(command) click to toggle source

Gem execute path

# 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) click to toggle source

Use template

# 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