capistrano-ash 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/ash/wordpress.rb +21 -1
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
data/lib/ash/wordpress.rb CHANGED
@@ -65,7 +65,27 @@ configuration.load do
65
65
  task :symlink, :roles => :web, :except => { :no_release => true } do
66
66
  run "ln -nfs #{shared_path}/uploads #{current_release}/#{uploads_path}"
67
67
  run "ln -nfs #{shared_path}/cache #{current_release}/wp-content/cache"
68
- run "ln -nfs #{latest_release}/wp-config.php.#{stage} #{latest_release}/wp-config.php"
68
+ symlink_confg
69
+ end
70
+
71
+ desc <<-DESC
72
+ Symlink the environment-specific wp-config file \
73
+ where <ENV> is the environment being deployed to.
74
+
75
+ Expected patterns are one of the two following examples:
76
+
77
+ wp-config.<ENV>.php
78
+ wp-config.php.<ENV>
79
+ DESC
80
+ task :symlink_confg, :roles => :web, :except => { :no_release => true } do
81
+ case true
82
+ when remote_file_exists?("#{latest_release}/wp-config.#{stage}.php")
83
+ run "ln -nfs #{latest_release}/wp-config.#{stage}.php #{latest_release}/wp-config.php"
84
+ when remote_file_exists?("#{latest_release}/wp-config.php.#{stage}")
85
+ run "ln -nfs #{latest_release}/wp-config.php.#{stage} #{latest_release}/wp-config.php"
86
+ else
87
+ logger.important "Failed to symlink the wp-config.php file in #{latest_release} because an unknown pattern was used"
88
+ end
69
89
  end
70
90
 
71
91
  desc "Set URL in database"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: