capistrano-ash 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ == 1.1.7
2
+ * Updated naming convention for Magento configuration files
3
+
1
4
  == 1.1.6
2
5
  * Bug Fix: removed "config" from ignore statement to prevent legit Magento files from being ignored
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.7
1
+ 1.1.8
data/lib/ash/base.rb CHANGED
@@ -23,6 +23,7 @@ configuration.load do
23
23
  # --------------------------------------------
24
24
  after "deploy:setup", "deploy:setup_shared"
25
25
  after "deploy:setup_shared", "deploy:setup_backup"
26
+ after "deploy:finalize_update", "ash:htaccess"
26
27
  after "deploy", "deploy:cleanup"
27
28
 
28
29
  # --------------------------------------------
@@ -104,6 +105,12 @@ configuration.load do
104
105
  task :getpath do
105
106
  run "echo $PATH"
106
107
  end
108
+
109
+ desc 'Copy distribution htaccess file'
110
+ task :htaccess do
111
+ run "mv #{latest_release}/htaccess.dist #{latest_release}/.htaccess" if
112
+ remote_file_exists?("#{latest_release}/htaccess.dist")
113
+ end
107
114
  end
108
115
 
109
116
  # --------------------------------------------
data/lib/ash/drupal.rb CHANGED
@@ -17,7 +17,7 @@ configuration.load do
17
17
  # --------------------------------------------
18
18
  # Calling our Methods
19
19
  # --------------------------------------------
20
- after "deploy:setup", "deploy:setup_shared"
20
+ after "deploy:setup", "deploy:setup_local"
21
21
  after "deploy:finalize_update", "ash:fixperms"
22
22
  after "deploy:symlink", "drupal:symlink"
23
23
  after "drupal:symlink","drupal:protect"
@@ -28,6 +28,12 @@ configuration.load do
28
28
  # Overloaded Methods
29
29
  # --------------------------------------------
30
30
  namespace :deploy do
31
+ desc "Setup local files necessary for deployment"
32
+ task :setup_local do
33
+ # attempt to create files needed for proper deployment
34
+ system("cp .htaccess htaccess.dist")
35
+ end
36
+
31
37
  desc "Setup shared application directories and permissions after initial setup"
32
38
  task :setup_shared, :roles => :web do
33
39
  # remove Capistrano specific directories
@@ -144,10 +150,5 @@ configuration.load do
144
150
  run "chmod 644 #{latest_release}/sites/#{url}/settings.php*"
145
151
  end
146
152
  end
147
-
148
- desc 'Copy over htaccess file'
149
- task :htaccess do
150
- run "cp #{latest_release}/htaccess.dist #{latest_release}/.htaccess"
151
- end
152
153
  end
153
154
  end
@@ -1,6 +1,5 @@
1
1
  # Required base libraries
2
- require 'ash/base'
3
- require 'railsless-deploy'
2
+ require 'ash/magento'
4
3
 
5
4
  # Bootstrap Capistrano instance
6
5
  configuration = Capistrano::Configuration.respond_to?(:instance) ?
@@ -16,21 +15,11 @@ configuration.load do
16
15
  # --------------------------------------------
17
16
  # Task chains
18
17
  # --------------------------------------------
19
- after "deploy:setup", "deploy:setup_local"
20
- after "deploy:finalize_update", "magento:activate_config"
21
- after "deploy:symlink", "magento:symlink"
22
- after "deploy", "magento:purge_cache"
23
18
 
24
19
  # --------------------------------------------
25
20
  # Overloaded tasks
26
21
  # --------------------------------------------
27
- namespace :deploy do
28
- desc "Setup local files necessary for deployment"
29
- task :setup_local do
30
- # attempt to create files needed for proper deployment
31
- system("touch htaccess.dist app/etc/local.xml.staging app/etc/local.xml.production")
32
- end
33
-
22
+ namespace :deploy do
34
23
  desc "Setup shared application directories and permissions after initial setup"
35
24
  task :setup_shared do
36
25
  # remove Capistrano specific directories
@@ -65,18 +54,6 @@ configuration.load do
65
54
  # set the file and directory permissions
66
55
  ash.fixperms
67
56
  end
68
-
69
- namespace :web do
70
- desc "Disable the application and show a message screen"
71
- task :disable, :except => { :no_release => true } do
72
- run "touch #{current_path}/maintenance.flag"
73
- end
74
-
75
- desc "Enable the application and remove the message screen"
76
- task :enable, :except => { :no_release => true } do
77
- run "rm #{current_path}/maintenance.flag"
78
- end
79
- end
80
57
  end
81
58
 
82
59
  # --------------------------------------------
@@ -90,51 +67,4 @@ configuration.load do
90
67
  run "find #{latest_release} -type f -exec chmod 644 {} \\;"
91
68
  end
92
69
  end
93
-
94
- # --------------------------------------------
95
- # Magento specific tasks
96
- # --------------------------------------------
97
- namespace :magento do
98
- desc "Set appropriate configuration values for the stage"
99
- task :activate_config, :except => { :no_release => true } do
100
- run "cp -f #{latest_release}/app/etc/local.xml.#{stage} #{latest_release}/app/etc/local.xml"
101
- end
102
-
103
- desc "Symlink shared directories"
104
- task :symlink, :except => { :no_release => true } do
105
- run "ln -nfs #{shared_path}/includes #{current_release}/includes"
106
- run "ln -nfs #{shared_path}/media #{current_release}/media"
107
- run "ln -nfs #{shared_path}/sitemap #{current_release}/sitemap"
108
- run "ln -nfs #{shared_path}/var #{current_release}/var"
109
- end
110
-
111
- desc "Purge Magento cache directory"
112
- task :purge_cache, :except => { :no_release => true } do
113
- run "rm -Rf #{shared_path}/var/cache/*"
114
- end
115
-
116
- desc "Watch Magento system log"
117
- task :watch_logs, :except => { :no_release => true } do
118
- run "tail -f #{shared_path}/var/log/system.log" do |channel, stream, data|
119
- puts # for an extra line break before the host name
120
- puts "#{channel[:host]}: #{data}"
121
- break if stream == :err
122
- end
123
- end
124
-
125
- desc "Watch Magento exception log"
126
- task :watch_exceptions, :except => { :no_release => true } do
127
- run "tail -f #{shared_path}/var/log/exception.log" do |channel, stream, data|
128
- puts # for an extra line break before the host name
129
- puts "#{channel[:host]}: #{data}"
130
- break if stream == :err
131
- end
132
- end
133
- end
134
-
135
- # --------------------------------------------
136
- # Custom tasks
137
- # --------------------------------------------
138
-
139
- # update core_config_data; set value = "domain" where scope_id = 0 and path = "web/unsecure/base_url"
140
70
  end
data/lib/ash/magento.rb CHANGED
@@ -24,7 +24,8 @@ configuration.load do
24
24
  desc "Setup local files necessary for deployment"
25
25
  task :setup_local do
26
26
  # attempt to create files needed for proper deployment
27
- system("touch app/etc/local.xml.staging app/etc/local.xml.production")
27
+ system("cp .htaccess htaccess.dist")
28
+ system("touch app/etc/local.staging.xml app/etc/local.production.xml")
28
29
  end
29
30
 
30
31
  desc "Setup shared application directories and permissions after initial setup"
@@ -58,8 +59,8 @@ configuration.load do
58
59
 
59
60
  # set the file and directory permissions
60
61
  ash.fixperms
61
- run "chmod 400 #{latest_release}/pear"
62
- run "chmod 400 #{latest_release}/mage"
62
+ run "chmod 400 #{latest_release}/pear" if remote_file_exists?("#{latest_release}/pear")
63
+ run "chmod 400 #{latest_release}/mage" if remote_file_exists?("#{latest_release}/mage")
63
64
  run "chmod o+w #{latest_release}/app/etc"
64
65
  end
65
66
 
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.1.7
4
+ version: 1.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-06 00:00:00.000000000 -05:00
12
+ date: 2011-07-07 00:00:00.000000000 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: August Ash recipes for Capistrano