magic_recipes 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,8 @@ set :server_ip, "0.0.0.0" #=> IP of the Server
|
|
13
13
|
set :deploy_to, "/home/deploy/apps/#{application}" #=> deploy path
|
14
14
|
set :rails_env, "production" #=> Rails environment
|
15
15
|
|
16
|
+
# => set :use_sudo, true
|
17
|
+
# => set :put_via, :scp # => :sftp | :scp
|
16
18
|
|
17
19
|
# rvm variables:
|
18
20
|
# => set :rvm_ruby, '1.9.3' #=> Ruby version
|
data/lib/magic_recipes.rb
CHANGED
@@ -58,11 +58,12 @@ module MagicRecipes
|
|
58
58
|
default_run_options[:pty] = true
|
59
59
|
ssh_options[:forward_agent] = true
|
60
60
|
|
61
|
+
# default put_via sftp
|
62
|
+
set_default :put_via, :sftp # => :sftp | :scp
|
61
63
|
|
62
64
|
def template(from, to)
|
63
65
|
erb = File.read(File.expand_path("../magic_recipes/templates/#{from}", __FILE__))
|
64
|
-
|
65
|
-
scp ERB.new(erb).result(binding), to
|
66
|
+
put ERB.new(erb).result(binding), to, via: put_via
|
66
67
|
end
|
67
68
|
|
68
69
|
def set_default(name, *args, &block)
|