capistrano-cul 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/VERSION +1 -1
- data/lib/capistrano/tasks/wp/deploy.cap +23 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0229d59429d92fb3ad6b6316d2e0cb4b3e35cd5f6541058da2cdce27cff86632'
|
4
|
+
data.tar.gz: 00e342d9bbf5ad0953b34630495b0c1f7d8bec69a53749e628c12c0c040f8c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c2c1a1ad4803773a7aedf38c858cbb5f6c6f0ee1f841ee385ca6b5f64f7674eca3f26279ba367e5ae116ddb9fac7e1edfd30d740d91cd6500616762d558e02a
|
7
|
+
data.tar.gz: 72be52d3afe3145f88bd8aba8956fd889e7e5880da618ec4ba7af6ff7fd63d604c8369828d78b8f9c42d2f892937587a3aa34decd522c67bdc5e346499ef6106
|
data/README.md
CHANGED
@@ -120,6 +120,11 @@ set :wp_content_rsync_exclude_filters, [
|
|
120
120
|
"uploads/2018/01/ignore_this_file.jpg",
|
121
121
|
"uploads/2018/02/also_ignore_this_file.jpg",
|
122
122
|
]
|
123
|
+
|
124
|
+
# For this example site, we're symlinking the wp-content/wflogs directory to a corresponding
|
125
|
+
# location under /var. We think that WordFence may be locking up occasionally when wflogs
|
126
|
+
# is on an NFS mount, and our /var mount is local disk. It seems to help.
|
127
|
+
before 'cul:wp:deploy:create_symlinks', 'cul:wp:deploy:symlink_wflogs_to_var_directory'
|
123
128
|
```
|
124
129
|
|
125
130
|
## Development
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
@@ -104,6 +104,29 @@ namespace :cul do
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
desc 'Symlink the wp-content wflogs directory to a corresponding directory in /var'
|
108
|
+
task :symlink_wflogs_to_var_directory do
|
109
|
+
opt_wflogs_path = File.join(fetch(:wp_docroot), 'wp-content', 'wflogs')
|
110
|
+
var_wflogs_path = opt_wflogs_path.sub(/^\/opt/, '/var')
|
111
|
+
|
112
|
+
on roles(:web) do
|
113
|
+
# Create target var wflogs dir if it doesn't exist
|
114
|
+
execute :mkdir, '-p', var_wflogs_path
|
115
|
+
|
116
|
+
# Check if a file or directory already exists at opt wflogs
|
117
|
+
if test "[ -e #{opt_wflogs_path} ]"
|
118
|
+
if test "[ -L #{opt_wflogs_path} ]"
|
119
|
+
# If it's a symlink, delete it and re-create it
|
120
|
+
execute :rm, opt_wflogs_path,
|
121
|
+
'&&', 'ln', '-s', var_wflogs_path, opt_wflogs_path
|
122
|
+
else
|
123
|
+
# If it's NOT a symlink, move it and symlink to the var wflogs dir
|
124
|
+
execute :mv, opt_wflogs_path, "#{opt_wflogs_path}-#{Time.now.strftime("%Y-%m-%d-%H%M")}",
|
125
|
+
'&&', 'ln', '-s', var_wflogs_path, opt_wflogs_path
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
107
130
|
end
|
108
131
|
end
|
109
132
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-cul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carla Galarza
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-11-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
143
|
+
rubygems_version: 3.2.32
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Common capistrano tasks shared across projects at CUL
|