capistrano_webfaction_recipes 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module CapistranoWebfactionRecipes
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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 = 'config/deploy.rb'
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
- remove_file(target_file)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_webfaction_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: