capistrano-wp 0.4.1 → 0.4.2
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/LICENSE.txt +89 -385
- data/README.md +19 -25
- data/Rakefile +17 -4
- data/VERSION +1 -1
- data/capistrano-wp.gemspec +9 -4
- data/doc/examples/Capfile +19 -0
- data/doc/examples/config/deploy.rb +38 -0
- data/doc/examples/config/deploy/production.rb +81 -0
- data/doc/examples/config/deploy/staging.rb +81 -0
- data/doc/examples/config/staging-local-config.php +28 -0
- data/lib/capistrano-wp.rb +14 -0
- data/lib/capistrano/crowdfavorite/wordpress.rb +14 -0
- data/lib/crowdfavorite.rb +14 -0
- data/lib/crowdfavorite/support/capistrano_extensions.rb +14 -0
- data/lib/crowdfavorite/support/namespace.rb +14 -0
- data/lib/crowdfavorite/tasks.rb +14 -0
- data/lib/crowdfavorite/tasks/localchanges.rb +16 -2
- data/lib/crowdfavorite/tasks/wordpress.rb +18 -4
- data/lib/crowdfavorite/version.rb +14 -0
- data/lib/crowdfavorite/wordpress.rb +14 -0
- data/spec/capistrano-wp_spec.rb +14 -0
- data/spec/localchanges_spec.rb +14 -0
- data/spec/spec_helper.rb +15 -1
- data/spec/support/capistrano.rb +14 -0
- metadata +20 -8
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'capistrano'
|
2
16
|
require 'crowdfavorite/support/capistrano_extensions'
|
3
17
|
|
data/lib/crowdfavorite/tasks.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'crowdfavorite'
|
2
16
|
module CrowdFavorite::Tasks
|
3
17
|
end
|
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'crowdfavorite/tasks'
|
2
16
|
|
3
17
|
module CrowdFavorite::Tasks::LocalChanges
|
@@ -11,7 +25,7 @@ module CrowdFavorite::Tasks::LocalChanges
|
|
11
25
|
end
|
12
26
|
|
13
27
|
_cset(:comparison_target) { current_release rescue File.dirname(release_path) }
|
14
|
-
_cset(:hash_creation) {
|
28
|
+
_cset(:hash_creation) {
|
15
29
|
# Find out what hashing mechanism we can use - shasum, sha1sum, openssl, or just an ls command.
|
16
30
|
# Unfortunate double-call of which handles some systems which output an error message on stdout
|
17
31
|
# when the program cannot be found.
|
@@ -53,7 +67,7 @@ module CrowdFavorite::Tasks::LocalChanges
|
|
53
67
|
hash_path = fetch(:snapshot_hash_path, default_hash_path)
|
54
68
|
|
55
69
|
snapshot_exists = _snapshot_exists(hash_path)
|
56
|
-
|
70
|
+
|
57
71
|
if snapshot_exists and !fetch(:snapshot_force, false)
|
58
72
|
logger.info "A snapshot for release #{target_release} already exists."
|
59
73
|
next
|
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'crowdfavorite/tasks'
|
2
16
|
require 'Shellwords'
|
3
17
|
|
@@ -23,7 +37,7 @@ module CrowdFavorite::Tasks::WordPress
|
|
23
37
|
|
24
38
|
_cset :copy_exclude, [
|
25
39
|
".git", ".gitignore", ".gitmodules",
|
26
|
-
".DS_Store", ".svn",
|
40
|
+
".DS_Store", ".svn",
|
27
41
|
"Capfile", "/config",
|
28
42
|
"capinfo.json",
|
29
43
|
]
|
@@ -53,12 +67,12 @@ module CrowdFavorite::Tasks::WordPress
|
|
53
67
|
|
54
68
|
_cset :wp_configs, {}
|
55
69
|
|
56
|
-
# stage_specific_overrides are uploaded from the repo's config
|
70
|
+
# stage_specific_overrides are uploaded from the repo's config
|
57
71
|
# directory, if they exist for that stage. Files are named
|
58
72
|
# 'STAGE-filename.txt' locally and copied to 'filename.txt'
|
59
73
|
# on deploy for that stage.
|
60
74
|
# Key is the local file; value is the target location.
|
61
|
-
# :stage_specific_overrides overwrites :base_stage_specific_overrides;
|
75
|
+
# :stage_specific_overrides overwrites :base_stage_specific_overrides;
|
62
76
|
# an empty target location means to skip uploading the file.
|
63
77
|
_cset :base_stage_specific_overrides, {
|
64
78
|
"local-config.php" => "local-config.php",
|
@@ -106,7 +120,7 @@ module CrowdFavorite::Tasks::WordPress
|
|
106
120
|
Dir.mktmpdir do |tmp_dir|
|
107
121
|
tmpdir = fetch(:cf_database_store, tmp_dir)
|
108
122
|
wp = fetch(:wordpress_version, "trunk")
|
109
|
-
Dir.chdir(tmpdir) do
|
123
|
+
Dir.chdir(tmpdir) do
|
110
124
|
if !(wp.start_with?("tags/") || wp.start_with?("branches/") || wp == "trunk")
|
111
125
|
wp = "branches/#{wp}"
|
112
126
|
end
|
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
module CrowdFavorite
|
2
16
|
VERSION = '0.2.0'
|
3
17
|
end
|
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
# Default set of tasks for wordpress deploys, including all the before/after bindings
|
2
16
|
|
3
17
|
require 'crowdfavorite/tasks/wordpress'
|
data/spec/capistrano-wp_spec.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
16
|
require 'crowdfavorite/tasks/wordpress'
|
3
17
|
|
data/spec/localchanges_spec.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
16
|
require 'crowdfavorite/tasks/localchanges'
|
3
17
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'bundler'
|
2
16
|
begin
|
3
17
|
Bundler.setup(:default, :development)
|
@@ -19,5 +33,5 @@ CrowdFavorite::Support::Namespace.default_config = nil
|
|
19
33
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
20
34
|
|
21
35
|
RSpec.configure do |config|
|
22
|
-
|
36
|
+
|
23
37
|
end
|
data/spec/support/capistrano.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# Copyright 2012-2013 Crowd Favorite, Ltd.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
1
15
|
require 'capistrano/spec'
|
2
16
|
|
3
17
|
RSpec.configure do |config|
|
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.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: 2013-07-
|
12
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -155,11 +155,18 @@ dependencies:
|
|
155
155
|
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
|
-
description: !
|
159
|
-
with
|
160
|
-
|
161
|
-
|
162
|
-
|
158
|
+
description: ! 'Recipes for deploying and maintaining remote WordPress installations
|
159
|
+
with
|
160
|
+
|
161
|
+
Capistrano. Pulls in WordPress from SVN, optionally using a local or
|
162
|
+
|
163
|
+
remote cache, and supports a number of common operations and tasks towards
|
164
|
+
|
165
|
+
the care and feeding of sites that may not be 100% maintained through
|
166
|
+
|
167
|
+
version control.
|
168
|
+
|
169
|
+
'
|
163
170
|
email:
|
164
171
|
executables: []
|
165
172
|
extensions: []
|
@@ -175,6 +182,11 @@ files:
|
|
175
182
|
- Rakefile
|
176
183
|
- VERSION
|
177
184
|
- capistrano-wp.gemspec
|
185
|
+
- doc/examples/Capfile
|
186
|
+
- doc/examples/config/deploy.rb
|
187
|
+
- doc/examples/config/deploy/production.rb
|
188
|
+
- doc/examples/config/deploy/staging.rb
|
189
|
+
- doc/examples/config/staging-local-config.php
|
178
190
|
- lib/capistrano-wp.rb
|
179
191
|
- lib/capistrano/crowdfavorite/wordpress.rb
|
180
192
|
- lib/crowdfavorite.rb
|
@@ -192,7 +204,7 @@ files:
|
|
192
204
|
- spec/support/capistrano.rb
|
193
205
|
homepage: http://github.com/crowdfavorite/gem-capistrano-wp
|
194
206
|
licenses:
|
195
|
-
-
|
207
|
+
- Apache License version 2
|
196
208
|
post_install_message:
|
197
209
|
rdoc_options: []
|
198
210
|
require_paths:
|