lib/magic_recipes.rb in magic_recipes-0.1.5 vs lib/magic_recipes.rb in magic_recipes-0.1.6

- old
+ new

@@ -56,17 +56,10 @@ require 'bundler/capistrano' default_run_options[:pty] = true ssh_options[:forward_agent] = true - # default put_via sftp - set_default :put_via, :sftp # => :sftp | :scp - - def template(from, to) - erb = File.read(File.expand_path("../magic_recipes/templates/#{from}", __FILE__)) - put ERB.new(erb).result(binding), to, via: put_via - end def set_default(name, *args, &block) set(name, *args, &block) unless exists?(name) end @@ -76,9 +69,16 @@ password = '' length.times { password << chars[rand(chars.size)] } password end + # default put_via sftp + set_default :put_via, :sftp # => :sftp | :scp + + def template(from, to) + erb = File.read(File.expand_path("../magic_recipes/templates/#{from}", __FILE__)) + put ERB.new(erb).result(binding), to, via: put_via + end set_default :use_rvm, false # => no_rvm namespace :deploy do desc "Install everything onto the server" \ No newline at end of file