wslave 0.0.13 → 0.0.15
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.
- checksums.yaml +4 -4
- data/base/config/deploy/production.rb +27 -6
- data/base/config/deploy/staging.rb +27 -6
- data/templates/config/definitions.yml +4 -1
- data/wslave.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48862b2ff0cd5f01ea03d6f886d6c18af96d686a
|
4
|
+
data.tar.gz: 76d7c311c9ce2f250fd4240f0f2ddca6615f00cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 280be51d001d467b4f7d0cd9ff96b9d6b34e912734b59899267ce7226d4f34e5b6cc734bf3e33621117e653c0fb774c1de22aa3890a370a2afa4a41d633e2c83
|
7
|
+
data.tar.gz: c13535a36797bff80aaa84e38f0aee547f7c4995a7ea5b1a72e2e95dee7d35aea016d8bf0b31f2eceba3989f712f245dcc809a4e384d0caa6056b6ca0359582f
|
@@ -75,17 +75,38 @@ namespace :deploy do
|
|
75
75
|
desc 'Perform special seed tasks required on intial seed'
|
76
76
|
task :initial do
|
77
77
|
on roles(:web) do
|
78
|
-
invoke('deploy:check:directories')
|
79
|
-
invoke('deploy:check:linked_dirs')
|
80
|
-
invoke('deploy:check:make_linked_dirs')
|
78
|
+
invoke!('deploy:check:directories')
|
79
|
+
invoke!('deploy:check:linked_dirs')
|
80
|
+
invoke!('deploy:check:make_linked_dirs')
|
81
81
|
invoke('deploy:wp_config')
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
if (opts.include?('options') && opts['options'].include?('rsync_enabled') &&
|
83
|
+
opts['options']['rsync_enabled'] == false)
|
84
|
+
invoke('deploy:upload_wp')
|
85
|
+
invoke('deploy:upload_plugins')
|
86
|
+
invoke('deploy:upload_uploads')
|
87
|
+
else
|
88
|
+
invoke('deploy:sync_wp')
|
89
|
+
invoke('deploy:sync_plugins')
|
90
|
+
invoke('deploy:sync_uploads')
|
91
|
+
end
|
85
92
|
invoke('deploy')
|
86
93
|
invoke('db:seed')
|
87
94
|
end
|
88
95
|
end
|
96
|
+
|
97
|
+
desc 'Clear out remote DB tables and delete all remote files in deploy target directory'
|
98
|
+
task :destruct do
|
99
|
+
on roles(:web) do
|
100
|
+
execute "mysqldump --opt --user=#{db_info['production']['username']} " \
|
101
|
+
"--password=#{db_info['production']['password']} --host=#{db_info['production']['host']} " \
|
102
|
+
"--add-drop-table --no-data #{db_info['production']['database']} | " \
|
103
|
+
"grep -e '^DROP \| FOREIGN_KEY_CHECKS' | mysql -u#{db_info['production']['username']} " \
|
104
|
+
"-p#{db_info['production']['password']} -h#{db_info['production']['host']} " \
|
105
|
+
"#{db_info['production']['database']}"
|
106
|
+
|
107
|
+
execute "rm -rf #{deploy_path}/*"
|
108
|
+
end
|
109
|
+
end
|
89
110
|
end
|
90
111
|
|
91
112
|
namespace :db do
|
@@ -75,17 +75,38 @@ namespace :deploy do
|
|
75
75
|
desc 'Perform special seed tasks required on intial seed'
|
76
76
|
task :initial do
|
77
77
|
on roles(:web) do
|
78
|
-
invoke('deploy:check:directories')
|
79
|
-
invoke('deploy:check:linked_dirs')
|
80
|
-
invoke('deploy:check:make_linked_dirs')
|
78
|
+
invoke!('deploy:check:directories')
|
79
|
+
invoke!('deploy:check:linked_dirs')
|
80
|
+
invoke!('deploy:check:make_linked_dirs')
|
81
81
|
invoke('deploy:wp_config')
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
if (opts.include?('options') && opts['options'].include?('rsync_enabled') &&
|
83
|
+
opts['options']['rsync_enabled'] == false)
|
84
|
+
invoke('deploy:upload_wp')
|
85
|
+
invoke('deploy:upload_plugins')
|
86
|
+
invoke('deploy:upload_uploads')
|
87
|
+
else
|
88
|
+
invoke('deploy:sync_wp')
|
89
|
+
invoke('deploy:sync_plugins')
|
90
|
+
invoke('deploy:sync_uploads')
|
91
|
+
end
|
85
92
|
invoke('deploy')
|
86
93
|
invoke('db:seed')
|
87
94
|
end
|
88
95
|
end
|
96
|
+
|
97
|
+
desc 'Clear out remote DB tables and delete all remote files in deploy target directory'
|
98
|
+
task :destruct do
|
99
|
+
on roles(:web) do
|
100
|
+
execute "mysqldump --opt --user=#{db_info['staging']['username']} " \
|
101
|
+
"--password=#{db_info['staging']['password']} --host=#{db_info['staging']['host']} " \
|
102
|
+
"--add-drop-table --no-data #{db_info['staging']['database']} | " \
|
103
|
+
"grep -e '^DROP \| FOREIGN_KEY_CHECKS' | mysql -u#{db_info['staging']['username']} " \
|
104
|
+
"-p#{db_info['staging']['password']} -h#{db_info['staging']['host']} " \
|
105
|
+
"#{db_info['staging']['database']}"
|
106
|
+
|
107
|
+
execute "rm -rf #{deploy_path}/*"
|
108
|
+
end
|
109
|
+
end
|
89
110
|
end
|
90
111
|
|
91
112
|
namespace :db do
|
@@ -11,4 +11,7 @@ app:
|
|
11
11
|
name:
|
12
12
|
repo:
|
13
13
|
options:
|
14
|
-
|
14
|
+
# Choose from: git-with-submodules, git, scp
|
15
|
+
deploy_method: git-with-submodules
|
16
|
+
# Use rsync to upload auxialiary content files (set to false if your server doesn't support rsync)
|
17
|
+
rsync_enabled: true
|
data/wslave.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'wslave'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.15'
|
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 ' \
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.required_ruby_version = '>= 2.0.0'
|
14
14
|
s.files = Dir.glob('lib/**/*.rb', File::FNM_DOTMATCH) +
|
15
15
|
Dir.glob('bin/**/*.rb', File::FNM_DOTMATCH) +
|
16
|
-
Dir.glob(
|
17
|
-
Dir.glob(
|
16
|
+
Dir.glob("base/**/*", File::FNM_DOTMATCH) +
|
17
|
+
Dir.glob("templates/**/*", File::FNM_DOTMATCH) +
|
18
18
|
['wslave.gemspec']
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
s.bindir = 'bin'
|
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.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rei Kagetsuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|