capistrano-wp 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -4
- data/VERSION +1 -1
- data/capistrano-wp.gemspec +2 -2
- data/lib/capistrano/templates/config/deploy.rb +14 -0
- data/lib/crowdfavorite/tasks/wordpress.rb +5 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -9,6 +9,11 @@ WP-Stack expects WordPress Core to be included in the project as a git
|
|
9
9
|
submodule; these recipes pull WordPress in from SVN (and can therefore
|
10
10
|
also deploy multisite environments with WP at the root).
|
11
11
|
|
12
|
+
**This is a Capistrano 2.X plugin, not for use with capistrano 3**
|
13
|
+
|
14
|
+
**[Contribute to the (possible) migration to Cap 3](https://github.com/crowdfavorite/gem-capistrano-wp/issues/6)**
|
15
|
+
|
16
|
+
|
12
17
|
## Usage
|
13
18
|
|
14
19
|
This is a plugin for the Capistrano deployment tool. If you are unfamiliar
|
@@ -53,14 +58,14 @@ This gem handles WordPress via SVN directly from WordPress.org.
|
|
53
58
|
|
54
59
|
In your main `config/deploy.rb` file you will see how to decalare what
|
55
60
|
version of WordPress you wish to use by defining an SVN location
|
56
|
-
like `branches/3.6`, `tags/3.6.1` or even `trunk
|
61
|
+
like `branches/3.6`, `tags/3.6.1` or even `trunk`:
|
57
62
|
|
58
63
|
```ruby
|
59
64
|
set :wordpress_version, "branches/3.5"
|
60
65
|
```
|
61
66
|
|
62
67
|
It then places WordPress where you declare it to live within the stage
|
63
|
-
specific configuration files, for example `config/deploy/production.rb
|
68
|
+
specific configuration files, for example `config/deploy/production.rb`:
|
64
69
|
|
65
70
|
```ruby
|
66
71
|
set(:wp_path) { File.join(release_path, "wp") }
|
@@ -69,9 +74,17 @@ set(:wp_path) { File.join(release_path, "wp") }
|
|
69
74
|
This places WordPress in a directory called "wp" within your webroot.
|
70
75
|
|
71
76
|
It also gracefully handles the situation where both your code repository
|
72
|
-
and WordPress live at the webroot
|
77
|
+
and WordPress live at the webroot.
|
78
|
+
|
79
|
+
This process enables you to not have to track WordPress within your code
|
80
|
+
repository.
|
73
81
|
|
74
|
-
|
82
|
+
If for some reason you want to avoid installing WordPress, omit or set to
|
83
|
+
false the `:wordpress_version` option:
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
set :wordpress_version, false
|
87
|
+
```
|
75
88
|
|
76
89
|
### Persistent file/directory symlinks
|
77
90
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.7
|
data/capistrano-wp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "capistrano-wp"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Crowd Favorite"]
|
12
|
-
s.date = "2013-11-
|
12
|
+
s.date = "2013-11-14"
|
13
13
|
s.description = "Recipes for deploying and maintaining remote WordPress installations with\nCapistrano. Pulls in WordPress from SVN, optionally using a local or\nremote cache, and supports a number of common operations and tasks towards\nthe care and feeding of sites that may not be 100% maintained through\nversion control.\n"
|
14
14
|
s.executables = ["capify-wp"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -24,3 +24,17 @@ set :git_enable_submodules, 1
|
|
24
24
|
set :keep_releases, 5
|
25
25
|
after "deploy:create_symlink", "deploy:cleanup"
|
26
26
|
|
27
|
+
#=============================================================================
|
28
|
+
# Additional Project specific directories
|
29
|
+
|
30
|
+
# Uncomment these lines to additionally create your upload and cache
|
31
|
+
# directories in the shared location when running `deploy:setup`.
|
32
|
+
#
|
33
|
+
# Modify these commands to make sure these directories are writable by
|
34
|
+
# your web server.
|
35
|
+
|
36
|
+
# after "deploy:setup" do
|
37
|
+
# ['uploads', 'cache'].each do |dir|
|
38
|
+
# run "cd #{shared_path} && mkdir #{dir} && chgrp www-data #{dir} && chmod 775 #{dir}"
|
39
|
+
# end
|
40
|
+
# end
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
require 'crowdfavorite/tasks'
|
16
|
-
require '
|
16
|
+
require 'shellwords'
|
17
17
|
|
18
18
|
module CrowdFavorite::Tasks::WordPress
|
19
19
|
extend CrowdFavorite::Support::Namespace
|
@@ -167,7 +167,10 @@ module CrowdFavorite::Tasks::WordPress
|
|
167
167
|
[internal] Installs WordPress to the application deploy point
|
168
168
|
DESC
|
169
169
|
task :default, :except => { :no_release => true } do
|
170
|
-
|
170
|
+
wp = fetch(:wordpress_version, false)
|
171
|
+
if wp.nil? or wp == false or wp.empty?
|
172
|
+
logger.info "Not installing WordPress"
|
173
|
+
elsif fetch(:strategy).class <= Capistrano::Deploy::Strategy.new(:remote).class
|
171
174
|
with_remote_cache
|
172
175
|
else
|
173
176
|
with_copy
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-wp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
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: 2013-11-
|
12
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|