wslave 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61e948f1644206ed6520ad69e43583dbafe1200208eb007d7dab044e09d1c84f
4
- data.tar.gz: 351b554954d11957292a027a440f7add6ee8156b7b5eeaa9d97fc7cbb9772fb9
3
+ metadata.gz: 9ee627106f6ba97b14f1adf9d636ef8b66a9ffcf89c996b59bb077633f2f1eaa
4
+ data.tar.gz: 1d31cf735fbeacb810f2558fd7c3b49af4fcef1a7421f27511aa89b0dbba0dee
5
5
  SHA512:
6
- metadata.gz: b67317839d90324f73bdd34c998832be78d367174fe2c88737d615a9811b9c5c531ea0bed198461425307b2b7e6742e330a9258abe7a10b99f7af9b1630a4756
7
- data.tar.gz: 2513942d0a62658f8a4b72bc0f2afcc3f933ad94c6f5507ad6f9a94c02571cdcfaa0b625049c9e2cf9f55d8789b3223f748c6eee3157a2b96dc0c986001d1d51
6
+ metadata.gz: ce2bce83363782e099e55132d5cf63730e4ebf16f5588446c69149a536c2d90a250eb94f07dc0748c820106513e210d31b889274c5df6bbcd52d33a4143e474c
7
+ data.tar.gz: 53fe21ad452756017e8a4ad0c7ef93b200f08b877b531776e80898e345cdd6f6608db58ffb6d4cb3af81754a97e2abf4329f65bb8b15d5d0032adff703c34fdf
@@ -23,7 +23,7 @@ role :web, "#{deploy_user}@#{host_addr}"
23
23
  set :tmp_dir, "#{multisite_root}/tmp"
24
24
  deploy_path = "#{multisite_root}/#{site_fqdn}"
25
25
 
26
- set :linked_dirs, %w{public/wp-content/uploads public/wordpress public/wp-content/upgrade public/wp-content/plugins tmp}
26
+ set :linked_dirs, %w{public/wp-content/uploads public/wordpress public/wp-content/upgrade public/wp-content/plugins public/data tmp}
27
27
  set :linked_files, %w{public/wp-config.php}
28
28
 
29
29
  set :deploy_to, deploy_path
@@ -82,6 +82,20 @@ namespace :deploy do
82
82
  end
83
83
  end
84
84
 
85
+ desc 'Syncs the static data directory with rsync'
86
+ task :sync_static_data do
87
+ on roles(:web) do
88
+ `rsync -avzPhu --delete ./public/data/ #{deploy_user}@#{host_addr}:#{deploy_path}/shared/public/data/`
89
+ end
90
+ end
91
+
92
+ desc 'Uploads the static data directory'
93
+ task :upload_static_data do
94
+ on roles(:web) do
95
+ upload! './public/data', "#{deploy_path}/shared/public/data/", recursive: true
96
+ end
97
+ end
98
+
85
99
  desc 'Builds and Syncs the project Sage theme'
86
100
  task :sync_sage_theme do
87
101
  on roles(:web) do
@@ -194,10 +208,12 @@ namespace :deploy do
194
208
  invoke('deploy:upload_wp')
195
209
  invoke('deploy:upload_plugins')
196
210
  invoke('deploy:upload_uploads')
211
+ invoke('deploy:upload_static_data')
197
212
  else
198
213
  invoke('deploy:sync_wp')
199
214
  invoke('deploy:sync_plugins')
200
215
  invoke('deploy:sync_uploads')
216
+ invoke('deploy:sync_static_data')
201
217
  end
202
218
  invoke('deploy')
203
219
  invoke('db:seed')
@@ -23,7 +23,7 @@ role :web, "#{deploy_user}@#{host_addr}"
23
23
  set :tmp_dir, "#{multisite_root}/tmp"
24
24
  deploy_path = "#{multisite_root}/#{site_fqdn}"
25
25
 
26
- set :linked_dirs, %w{public/wp-content/uploads public/wordpress public/wp-content/upgrade public/wp-content/plugins tmp}
26
+ set :linked_dirs, %w{public/wp-content/uploads public/wordpress public/wp-content/upgrade public/wp-content/plugins public/data tmp}
27
27
  set :linked_files, %w{public/wp-config.php}
28
28
 
29
29
  set :deploy_to, deploy_path
@@ -82,6 +82,20 @@ namespace :deploy do
82
82
  end
83
83
  end
84
84
 
85
+ desc 'Syncs the static data directory with rsync'
86
+ task :sync_static_data do
87
+ on roles(:web) do
88
+ `rsync -avzPhu --delete ./public/data/ #{deploy_user}@#{host_addr}:#{deploy_path}/shared/public/data/`
89
+ end
90
+ end
91
+
92
+ desc 'Uploads the static data directory'
93
+ task :upload_static_data do
94
+ on roles(:web) do
95
+ upload! './public/data', "#{deploy_path}/shared/public/data/", recursive: true
96
+ end
97
+ end
98
+
85
99
  desc 'Builds and Syncs the project Sage theme'
86
100
  task :sync_sage_theme do
87
101
  on roles(:web) do
@@ -194,10 +208,12 @@ namespace :deploy do
194
208
  invoke('deploy:upload_wp')
195
209
  invoke('deploy:upload_plugins')
196
210
  invoke('deploy:upload_uploads')
211
+ invoke('deploy:upload_static_data')
197
212
  else
198
213
  invoke('deploy:sync_wp')
199
214
  invoke('deploy:sync_plugins')
200
215
  invoke('deploy:sync_uploads')
216
+ invoke('deploy:sync_static_data')
201
217
  end
202
218
  invoke('deploy')
203
219
  invoke('db:seed')
@@ -57,6 +57,9 @@ class WSlaveNew
57
57
  FileUtils.touch("#{path}/public/wp-content/upgrade/.gitkeep")
58
58
  Dir.chdir path
59
59
 
60
+ puts " > Preparing statid data directory"
61
+ FileUtils.mkdir("#{path}/public/data") unless Dir.exist?("#{path}/public/data")
62
+
60
63
  puts " > Setting permissions"
61
64
  WSlaveTools.set_dev_perms
62
65
 
@@ -23,6 +23,8 @@ class WSlaveTools
23
23
  FileUtils.chmod(0775, "#{path}/public/wp-content/plugins")
24
24
  FileUtils.chown(nil, 'www-data', "#{path}/public/wp-content/upgrade")
25
25
  FileUtils.chmod(0775, "#{path}/public/wp-content/upgrade")
26
+ FileUtils.chown(nil, 'www-data', "#{path}/public/data")
27
+ FileUtils.chmod(0775, "#{path}/public/data")
26
28
 
27
29
  unless Dir.exist?("#{path}/db")
28
30
  FileUtils.mkdir("#{path}/db")
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'wslave'
3
- s.version = '0.2.2'
3
+ s.version = '0.2.3'
4
4
  s.licenses = ['GPL-3.0', 'AGPL-3.0']
5
5
  s.summary = '"Word Slave" generates and controls a WordPress installation'
6
6
  s.description = 'Word Slave includes the wslave command and a control library to generate a ' \
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wslave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2020-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -164,8 +164,6 @@ files:
164
164
  - base/config/deploy-tools/wp-config.php.erb
165
165
  - base/config/deploy-tools/wp-config.php.local
166
166
  - base/config/deploy.rb
167
- - base/config/deploy/.production.rb.swp
168
- - base/config/deploy/.staging.rb.swp
169
167
  - base/config/deploy/production.rb
170
168
  - base/config/deploy/staging.rb
171
169
  - base/docker-compose.yml