capistrano_webfaction_recipes 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,13 +10,14 @@ module Webfaction
|
|
10
10
|
desc "Creates a deploy file that is well organized and makes easy webfaction task usage"
|
11
11
|
|
12
12
|
def copy_deploy
|
13
|
-
target_file
|
13
|
+
target_file = 'config/deploy.rb'
|
14
|
+
old_deploy_must_be_removed = false
|
14
15
|
if File.exists?(target_file)
|
15
16
|
unless yes?('Deploy file already exists and will be overwritten, would you like to continue?')
|
16
17
|
puts 'Operation aborted'
|
17
18
|
return
|
18
19
|
end
|
19
|
-
|
20
|
+
old_deploy_must_be_removed = true
|
20
21
|
end
|
21
22
|
@rails_app_root_dir_name = File.basename(Dir.pwd)
|
22
23
|
@server_ssh_user = ask('Insert your server ssh username')
|
@@ -25,6 +26,8 @@ module Webfaction
|
|
25
26
|
@remote_rails_app_root_dir_name = 'PUT_REMOTE_RAILS_APP_ROOT_DIR_NAME' if @remote_rails_app_root_dir_name.blank?
|
26
27
|
@bitbucket_user = ask('Insert your bitbucket username')
|
27
28
|
@bitbucket_user = 'PUT_BITBUCKET_USER' if @bitbucket_user.blank?
|
29
|
+
|
30
|
+
remove_file(target_file) if old_deploy_must_be_removed
|
28
31
|
template "deploy.rb.erb", target_file
|
29
32
|
end
|
30
33
|
|