Top Level Namespace
Defined Under Namespace
Modules: RecipesMatic
Instance Method Summary collapse
-
#gem_execute(command) ⇒ Object
Gem execute path.
-
#template(from, to) ⇒ Object
Use template.
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.("../templates/#{from}", __FILE__)) File.open(File.("tmp/temprory"), 'w') { |file| file.write(ERB.new(erb).result(binding)) } upload! File.("tmp/temprory"), to end |