capistrano-ash 0.0.12 → 0.0.13
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.
- data/VERSION +1 -1
- data/capistrano-ash.gemspec +3 -2
- data/lib/ash/common.rb +1 -1
- data/lib/ash/magento.rb +13 -3
- data/lib/ash/wordpress.rb +69 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
data/capistrano-ash.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{capistrano-ash}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.13"
|
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 = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-22}
|
13
13
|
s.description = %q{August Ash recipes for Capistrano}
|
14
14
|
s.email = %q{jake@augustash.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"lib/ash/common.rb",
|
26
26
|
"lib/ash/drupal.rb",
|
27
27
|
"lib/ash/magento.rb",
|
28
|
+
"lib/ash/wordpress.rb",
|
28
29
|
"lib/ash/zend_doctrine.rb"
|
29
30
|
]
|
30
31
|
s.homepage = %q{https://github.com/augustash/capistrano-ash}
|
data/lib/ash/common.rb
CHANGED
data/lib/ash/magento.rb
CHANGED
@@ -90,13 +90,21 @@ configuration.load do
|
|
90
90
|
end
|
91
91
|
|
92
92
|
desc "Watch Magento system log"
|
93
|
-
task :watch_logs, :except => { :no_release => true } do
|
94
|
-
|
93
|
+
task :watch_logs, :except => { :no_release => true } do
|
94
|
+
run "tail -f #{shared_path}/var/log/system.log" do |channel, stream, data|
|
95
|
+
puts # for an extra line break before the host name
|
96
|
+
puts "#{channel[:host]}: #{data}"
|
97
|
+
break if stream == :err
|
98
|
+
end
|
95
99
|
end
|
96
100
|
|
97
101
|
desc "Watch Magento exception log"
|
98
102
|
task :watch_exceptions, :except => { :no_release => true } do
|
99
|
-
|
103
|
+
run "tail -f #{shared_path}/var/log/exception.log" do |channel, stream, data|
|
104
|
+
puts # for an extra line break before the host name
|
105
|
+
puts "#{channel[:host]}: #{data}"
|
106
|
+
break if stream == :err
|
107
|
+
end
|
100
108
|
end
|
101
109
|
end
|
102
110
|
|
@@ -104,4 +112,6 @@ configuration.load do
|
|
104
112
|
# Custom tasks
|
105
113
|
# --------------------------------------------
|
106
114
|
|
115
|
+
# update core_config_data; set value = "domain" where scope_id = 0 and path = "web/unsecure/base_url"
|
116
|
+
|
107
117
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Require our base library.
|
2
|
+
require 'ash/base'
|
3
|
+
|
4
|
+
configuration = Capistrano::Configuration.respond_to?(:instance) ?
|
5
|
+
Capistrano::Configuration.instance(:must_exist) :
|
6
|
+
Capistrano.configuration(:must_exist)
|
7
|
+
|
8
|
+
configuration.load do
|
9
|
+
|
10
|
+
# --------------------------------------------
|
11
|
+
# Calling our Methods
|
12
|
+
# --------------------------------------------
|
13
|
+
after "deploy:setup", "deploy:setup_shared"
|
14
|
+
after "deploy:symlink", "wordpress:symlink"
|
15
|
+
after "ash:fixperms", "wordpress:protect"
|
16
|
+
|
17
|
+
# --------------------------------------------
|
18
|
+
# Overloaded Methods
|
19
|
+
# --------------------------------------------
|
20
|
+
namespace :deploy do
|
21
|
+
desc "Setup shared application directories and permissions after initial setup"
|
22
|
+
task :setup_shared, :roles => :web do
|
23
|
+
# remove Capistrano specific directories
|
24
|
+
run "rm -Rf #{shared_path}/log"
|
25
|
+
run "rm -Rf #{shared_path}/pids"
|
26
|
+
run "rm -Rf #{shared_path}/system"
|
27
|
+
|
28
|
+
# create shared directories
|
29
|
+
run "mkdir -p #{shared_path}/uploads"
|
30
|
+
run "mkdir -p #{shared_path}/cache"
|
31
|
+
|
32
|
+
# set correct permissions
|
33
|
+
run "chmod -R 777 #{shared_path}/*"
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "[internal] Touches up the released code. This is called by update_code after the basic deploy finishes."
|
37
|
+
task :finalize_update, :except => { :no_release => true } do
|
38
|
+
# remove shared directories
|
39
|
+
run "rm -Rf #{latest_release}/uploads"
|
40
|
+
run "rm -Rf #{latest_release}/wp-content/cache"
|
41
|
+
# Removing cruft files.
|
42
|
+
run "rm -Rf #{latest_release}/license.txt"
|
43
|
+
run "rm -Rf #{latest_release}/readme.html"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# --------------------------------------------
|
48
|
+
# Wordpress-specific methods
|
49
|
+
# --------------------------------------------
|
50
|
+
namespace :wordpress do
|
51
|
+
desc "Links the correct settings file"
|
52
|
+
task :symlink do
|
53
|
+
run "ln -nfs #{shared_path}/uploads #{current_release}/uploads"
|
54
|
+
run "ln -nfs #{shared_path}/cache #{current_release}/wp-content/cache"
|
55
|
+
run "ln -nfs #{latest_release}/wp-config.php #{latest_release}/wp-config.php.#{stage}"
|
56
|
+
end
|
57
|
+
|
58
|
+
desc "Set URL in database"
|
59
|
+
task :updatedb do
|
60
|
+
run "mysql -u #{dbuser} -p #{dbpass} #{dbname} -e 'UPDATE #{dbprefix}options SET option_value = \"#{application}\" WHERE option_name = \"siteurl\" OR option_name = \"home\"'"
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "Protect system files"
|
64
|
+
task :protect, :except => { :no_release => true } do
|
65
|
+
run "chmod 440 #{latest_release}/wp-config.php*"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 13
|
9
|
+
version: 0.0.13
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- August Ash
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-22 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- lib/ash/common.rb
|
37
37
|
- lib/ash/drupal.rb
|
38
38
|
- lib/ash/magento.rb
|
39
|
+
- lib/ash/wordpress.rb
|
39
40
|
- lib/ash/zend_doctrine.rb
|
40
41
|
has_rdoc: true
|
41
42
|
homepage: https://github.com/augustash/capistrano-ash
|