capistrano-ash 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capistrano-ash"
8
- s.version = "1.2.0"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["August Ash"]
12
- s.date = "2012-08-23"
12
+ s.date = "2012-10-11"
13
13
  s.description = "August Ash recipes for Capistrano"
14
14
  s.email = "code@augustash.com"
15
15
  s.extra_rdoc_files = [
data/lib/ash/base.rb CHANGED
@@ -145,7 +145,7 @@ configuration.load do
145
145
  directories = (local_releases - local_releases.last(count)).map { |release|
146
146
  File.join(releases_path, release) }.join(" ")
147
147
 
148
- directories.each do |dir|
148
+ directories.split(" ").each do |dir|
149
149
  set_perms_dirs(dir)
150
150
  set_perms_files(dir)
151
151
  end
@@ -178,8 +178,16 @@ configuration.load do
178
178
 
179
179
  desc 'Copy distribution htaccess file'
180
180
  task :htaccess, :roles => :web do
181
- run "mv #{latest_release}/htaccess.dist #{latest_release}/.htaccess" if
182
- remote_file_exists?("#{latest_release}/htaccess.dist")
181
+ case true
182
+ when remote_file_exists?("#{latest_release}/htaccess.#{stage}.dist")
183
+ run "mv #{latest_release}/htaccess.#{stage}.dist #{latest_release}/.htaccess"
184
+ when remote_file_exists?("#{latest_release}/htaccess.#{stage}")
185
+ run "mv #{latest_release}/htaccess.#{stage} #{latest_release}/.htaccess"
186
+ when remote_file_exists?("#{latest_release}/htaccess.dist")
187
+ run "mv #{latest_release}/htaccess.dist #{latest_release}/.htaccess"
188
+ else
189
+ logger.important "Failed to move the .htaccess file in #{latest_release} because an unknown pattern was used"
190
+ end
183
191
  end
184
192
  end
185
193
 
data/lib/ash/magento.rb CHANGED
@@ -127,6 +127,18 @@ configuration.load do
127
127
  break if stream == :err
128
128
  end
129
129
  end
130
+
131
+ desc "Clear the Magento Cache"
132
+ task :cc, :roles => [:web, :app], :except => { :no_release => true } do
133
+ magento.purge_cache
134
+ sudo "rm -rf #{shared_path}/var/full_page_cache/*"
135
+ end
136
+
137
+ desc "Enable display errors"
138
+ task :enable_dev, :roles => :web, :except => { :no_release => true } do
139
+ run "perl -pi -e 's/#ini_set/ini_set/g' #{latest_release}/index.php"
140
+ end
141
+
130
142
  end
131
143
 
132
144
  # --------------------------------------------
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.1
4
+ version: 1.2.2
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: 2012-08-23 00:00:00.000000000 Z
12
+ date: 2012-10-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: August Ash recipes for Capistrano
15
15
  email: code@augustash.com