wordmove 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/deploy/deploy.sh +3 -0
- data/lib/wordmove/deployer/base.rb +0 -47
- data/lib/wordmove/deployer/ftp.rb +16 -0
- data/lib/wordmove/deployer/ssh.rb +48 -1
- data/lib/wordmove/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7422046f369c26aa171776add69d5d2455b42393
|
4
|
+
data.tar.gz: e786aad0811f74fa150e02a81339d0d94362c757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05acca9d20de0285d5e8d738c82a7097572f24265b90849aaaef7fca8e9d7583f2baecb13babed8473b9495ae148b636bc2c96cdd067cbbe282db76e5310d62d
|
7
|
+
data.tar.gz: 3ff010b89f52209d65ac853dee0f7480009ec14378699771dfd659aa15773e52a00ed149993710b92058cf2ba7bae557132bf1fbe4fc859cd9dd1269a2d3e969
|
data/.travis.yml
CHANGED
@@ -1,11 +1,22 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
2
3
|
rvm:
|
3
4
|
- 2.4.0
|
4
5
|
- 2.4.3
|
5
6
|
- 2.5.0
|
7
|
+
|
6
8
|
cache: bundler
|
9
|
+
|
7
10
|
install:
|
8
11
|
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
9
12
|
- chmod +x wp-cli.phar
|
10
13
|
- sudo mv wp-cli.phar /usr/local/bin/wp
|
11
14
|
- bundle install --jobs=3 --retry=3
|
15
|
+
|
16
|
+
deploy:
|
17
|
+
provider: script
|
18
|
+
script: bash deploy/deploy.sh
|
19
|
+
on:
|
20
|
+
tags: true
|
21
|
+
branch: master
|
22
|
+
ruby: '2.5.0'
|
data/deploy/deploy.sh
ADDED
@@ -53,25 +53,6 @@ module Wordmove
|
|
53
53
|
|
54
54
|
def remote_put_directory; end
|
55
55
|
|
56
|
-
%w[uploads themes plugins mu_plugins languages].each do |task|
|
57
|
-
define_method "push_#{task}" do
|
58
|
-
logger.task "Pushing #{task.titleize}"
|
59
|
-
local_path = local_options[:wordpress_path]
|
60
|
-
remote_path = remote_options[:wordpress_path]
|
61
|
-
|
62
|
-
remote_put_directory(local_path, remote_path,
|
63
|
-
push_exclude_paths, push_inlcude_paths(task))
|
64
|
-
end
|
65
|
-
|
66
|
-
define_method "pull_#{task}" do
|
67
|
-
logger.task "Pulling #{task.titleize}"
|
68
|
-
local_path = local_options[:wordpress_path]
|
69
|
-
remote_path = remote_options[:wordpress_path]
|
70
|
-
remote_get_directory(remote_path, local_path,
|
71
|
-
pull_exclude_paths, pull_include_paths(task))
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
56
|
def exclude_dir_contents(path)
|
76
57
|
"#{path}/*"
|
77
58
|
end
|
@@ -205,34 +186,6 @@ module Wordmove
|
|
205
186
|
def local_options
|
206
187
|
options[:local].clone
|
207
188
|
end
|
208
|
-
|
209
|
-
def push_inlcude_paths(task)
|
210
|
-
[
|
211
|
-
"/#{local_wp_content_dir.relative_path}/",
|
212
|
-
"/#{local_wp_content_dir.relative_path}/#{task}/"
|
213
|
-
]
|
214
|
-
end
|
215
|
-
|
216
|
-
def push_exclude_paths
|
217
|
-
paths_to_exclude + [
|
218
|
-
"/*",
|
219
|
-
"/#{local_wp_content_dir.relative_path}/*"
|
220
|
-
]
|
221
|
-
end
|
222
|
-
|
223
|
-
def pull_include_paths(task)
|
224
|
-
[
|
225
|
-
"/#{remote_wp_content_dir.relative_path}/",
|
226
|
-
"/#{remote_wp_content_dir.relative_path}/#{task}/"
|
227
|
-
]
|
228
|
-
end
|
229
|
-
|
230
|
-
def pull_exclude_paths
|
231
|
-
paths_to_exclude + [
|
232
|
-
"/*",
|
233
|
-
"/#{remote_wp_content_dir.relative_path}/*"
|
234
|
-
]
|
235
|
-
end
|
236
189
|
end
|
237
190
|
end
|
238
191
|
end
|
@@ -58,6 +58,22 @@ module Wordmove
|
|
58
58
|
|
59
59
|
private
|
60
60
|
|
61
|
+
%w[uploads themes plugins mu_plugins languages].each do |task|
|
62
|
+
define_method "push_#{task}" do
|
63
|
+
logger.task "Pushing #{task.titleize}"
|
64
|
+
local_path = send("local_#{task}_dir").path
|
65
|
+
remote_path = send("remote_#{task}_dir").path
|
66
|
+
remote_put_directory(local_path, remote_path, paths_to_exclude)
|
67
|
+
end
|
68
|
+
|
69
|
+
define_method "pull_#{task}" do
|
70
|
+
logger.task "Pulling #{task.titleize}"
|
71
|
+
local_path = send("local_#{task}_dir").path
|
72
|
+
remote_path = send("remote_#{task}_dir").path
|
73
|
+
remote_get_directory(remote_path, local_path, paths_to_exclude)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
61
77
|
%w[get get_directory put_directory delete].each do |command|
|
62
78
|
define_method "remote_#{command}" do |*args|
|
63
79
|
logger.task_step false, "#{command}: #{args.join(' ')}"
|
@@ -25,7 +25,7 @@ module Wordmove
|
|
25
25
|
.path("#{environment}-backup-#{Time.now.to_i}.sql.gz")
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
private
|
29
29
|
|
30
30
|
def push_db
|
31
31
|
super
|
@@ -91,6 +91,53 @@ module Wordmove
|
|
91
91
|
remote_run mysql_import_command(remote_dump_path, remote_options[:database])
|
92
92
|
remote_delete(remote_dump_path)
|
93
93
|
end
|
94
|
+
|
95
|
+
%w[uploads themes plugins mu_plugins languages].each do |task|
|
96
|
+
define_method "push_#{task}" do
|
97
|
+
logger.task "Pushing #{task.titleize}"
|
98
|
+
local_path = local_options[:wordpress_path]
|
99
|
+
remote_path = remote_options[:wordpress_path]
|
100
|
+
|
101
|
+
remote_put_directory(local_path, remote_path,
|
102
|
+
push_exclude_paths, push_inlcude_paths(task))
|
103
|
+
end
|
104
|
+
|
105
|
+
define_method "pull_#{task}" do
|
106
|
+
logger.task "Pulling #{task.titleize}"
|
107
|
+
local_path = local_options[:wordpress_path]
|
108
|
+
remote_path = remote_options[:wordpress_path]
|
109
|
+
remote_get_directory(remote_path, local_path,
|
110
|
+
pull_exclude_paths, pull_include_paths(task))
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def push_inlcude_paths(task)
|
115
|
+
[
|
116
|
+
"/#{local_wp_content_dir.relative_path}/",
|
117
|
+
"/#{local_wp_content_dir.relative_path}/#{task}/"
|
118
|
+
]
|
119
|
+
end
|
120
|
+
|
121
|
+
def push_exclude_paths
|
122
|
+
paths_to_exclude + [
|
123
|
+
"/*",
|
124
|
+
"/#{local_wp_content_dir.relative_path}/*"
|
125
|
+
]
|
126
|
+
end
|
127
|
+
|
128
|
+
def pull_include_paths(task)
|
129
|
+
[
|
130
|
+
"/#{remote_wp_content_dir.relative_path}/",
|
131
|
+
"/#{remote_wp_content_dir.relative_path}/#{task}/"
|
132
|
+
]
|
133
|
+
end
|
134
|
+
|
135
|
+
def pull_exclude_paths
|
136
|
+
paths_to_exclude + [
|
137
|
+
"/*",
|
138
|
+
"/#{remote_wp_content_dir.relative_path}/*"
|
139
|
+
]
|
140
|
+
end
|
94
141
|
end
|
95
142
|
end
|
96
143
|
end
|
data/lib/wordmove/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordmove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-05-
|
15
|
+
date: 2018-05-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -256,6 +256,7 @@ files:
|
|
256
256
|
- bin/setup
|
257
257
|
- bin/thor
|
258
258
|
- bin/wordmove
|
259
|
+
- deploy/deploy.sh
|
259
260
|
- exe/wordmove
|
260
261
|
- lib/wordmove.rb
|
261
262
|
- lib/wordmove/assets/dump.php.erb
|