wordmove 1.4.0.pre10 → 2.0.0
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/.rubocop.yml +5 -2
- data/CHANGELOG.md +23 -4
- data/README.mdown +14 -0
- data/lib/wordmove/assets/dump.php.erb +1 -1
- data/lib/wordmove/deployer/base.rb +6 -4
- data/lib/wordmove/deployer/ftp.rb +3 -3
- data/lib/wordmove/deployer/ssh.rb +3 -3
- data/lib/wordmove/logger.rb +4 -4
- data/lib/wordmove/version.rb +1 -1
- data/lib/wordmove/wordpress_directory/path.rb +1 -0
- data/lib/wordmove/wordpress_directory.rb +1 -0
- data/wordmove.gemspec +7 -4
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c75c47a87130b4c700820fb754c935ae0bd9b666
|
4
|
+
data.tar.gz: 57d9a3521a5dbebfba7848d88083d2da4b0da04a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a629a9a4329304d44bcac601fe770a3e1ba2260a8e7edb0f3a79d6f49a717e5dd94e52e9968ead7d1073fc35ee3fafddeac89f26b2e88c9c46b5ee6a20bddf47
|
7
|
+
data.tar.gz: cc999560a1be103b7a1c5b6c3b9e1e8577de58cab84f93583907ead286c84e6e4acfcbb39dd29909e09f585d55fcf2cdd40d1bd54458fcd794a403b4833b639c
|
data/.rubocop.yml
CHANGED
@@ -16,11 +16,14 @@ Metrics/LineLength:
|
|
16
16
|
Max: 100
|
17
17
|
|
18
18
|
Metrics/MethodLength:
|
19
|
-
Max:
|
19
|
+
Max: 20
|
20
20
|
|
21
21
|
Metrics/ClassLength:
|
22
22
|
Max: 200
|
23
23
|
|
24
|
+
Metrics/CyclomaticComplexity:
|
25
|
+
Max: 10
|
26
|
+
|
24
27
|
Style/StringLiterals:
|
25
28
|
Enabled: false
|
26
29
|
EnforcedStyle: double_quotes
|
@@ -32,4 +35,4 @@ Style/FrozenStringLiteralComment:
|
|
32
35
|
Enabled: false
|
33
36
|
|
34
37
|
Metrics/AbcSize:
|
35
|
-
Max:
|
38
|
+
Max: 40
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,30 @@
|
|
1
|
-
#
|
1
|
+
# 2.0.0
|
2
|
+
|
3
|
+
## Features
|
2
4
|
- Implemented compression of sql files before and after transfers
|
3
5
|
- Implemented compression of sql backup files inside wp-content
|
4
|
-
- Implemented support to mu-plugins directory
|
5
|
-
-
|
6
|
+
- Implemented support to mu-plugins directory
|
7
|
+
- Updated `dump.php` library to support database VIEWS
|
8
|
+
- Added `--debug` option: do not automatically delete FTP dumps file so you can inspect errors (if any)
|
9
|
+
- Better support for large dbs import
|
10
|
+
- Allow ruby code in `Movefile` (`erb`)
|
11
|
+
- Added ability to pass mysqldump options via `mysqldump_options` in `Movefile`
|
12
|
+
|
13
|
+
|
14
|
+
## Bugfixes
|
15
|
+
- Ignore php error for `date()` while dumping database via FTP
|
16
|
+
- Better escape for Windows paths
|
17
|
+
- Show a warning if no `Movefile` found
|
18
|
+
- Fix ruby warnings for `PATH` module
|
19
|
+
- Fix FTP dump bug introduced in `1.3.1`
|
20
|
+
|
21
|
+
## Thanks to
|
6
22
|
|
23
|
+
@amchoukir @ChuckMac @connormckelvey @delphaber @dsgnr @esad @inamoth @JimmY2K
|
24
|
+
@kenchan0130 @matjack1 @miya0001 @Mte90 @mukkoo @pioneerskiees @spanndemic
|
25
|
+
@StefanoOrdine @tiojoca @xrmx
|
7
26
|
|
8
|
-
# 1.3.1
|
27
|
+
# 1.3.1 (yanked)
|
9
28
|
- Fix typo in dump.php.erb
|
10
29
|
|
11
30
|
# 1.3.0
|
data/README.mdown
CHANGED
@@ -57,6 +57,13 @@ local:
|
|
57
57
|
password: "password"
|
58
58
|
host: "127.0.0.1"
|
59
59
|
|
60
|
+
# paths: # you can customize wordpress internal paths
|
61
|
+
# wp_content: "wp-content"
|
62
|
+
# uploads: "wp-content/uploads"
|
63
|
+
# plugins: "wp-content/plugins"
|
64
|
+
# themes: "wp-content/themes"
|
65
|
+
# languages: "wp-content/languages"
|
66
|
+
|
60
67
|
production:
|
61
68
|
vhost: "http://example.com"
|
62
69
|
wordpress_path: "/var/www/your_site" # use an absolute path here
|
@@ -89,6 +96,7 @@ We warmly **recommend** to read the wiki article [Multiple environments explaine
|
|
89
96
|
](https://github.com/welaika/wordmove/wiki/Multiple-environments-explained) if you need multi-stage support, and the wiki article [Movefile configurations explained](https://github.com/welaika/wordmove/wiki/Movefile-configurations-explained) to understand about the supported configurations.
|
90
97
|
|
91
98
|
## Supports
|
99
|
+
|
92
100
|
### OS
|
93
101
|
|
94
102
|
OS X and Linux are fully supported.
|
@@ -125,6 +133,7 @@ We warmly **recommend** to read the wiki article: [Multiple environments explain
|
|
125
133
|
](https://github.com/welaika/wordmove/wiki/Multiple-environments-explained)
|
126
134
|
|
127
135
|
## Notes
|
136
|
+
|
128
137
|
### How the heck you are able to sync the DB via FTP?
|
129
138
|
|
130
139
|
We're glad you asked! We basically upload via FTP a PHP script that performs the various
|
@@ -133,6 +142,11 @@ too much about security though: the script is deleted just after the usage,
|
|
133
142
|
and can only be executed by `wordmove`, as each time it requires a pre-shared
|
134
143
|
one-time-password to be run.
|
135
144
|
|
145
|
+
### Yanked versions
|
146
|
+
|
147
|
+
Wordmove `1.3.1` has been removed from `rubygems` due to a bug with FTP deploying system. If you are
|
148
|
+
using this version, please update soon (`gem update wordmove`).
|
149
|
+
|
136
150
|
## Need more tools?
|
137
151
|
Visit [Wordpress Tools](http://wptools.it).
|
138
152
|
|
@@ -95,7 +95,7 @@ class MySQLDump
|
|
95
95
|
$this->connection->query('LOCK TABLES `' . implode('` READ, `', $tables) . '` READ');
|
96
96
|
|
97
97
|
$db = $this->connection->query('SELECT DATABASE()')->fetch_row();
|
98
|
-
fwrite($handle, "-- Created at " . date('j.n.Y G:i') . " using David Grudl MySQL Dump Utility\n"
|
98
|
+
fwrite($handle, "-- Created at " . @date('j.n.Y G:i') . " using David Grudl MySQL Dump Utility\n"
|
99
99
|
. (isset($_SERVER['HTTP_HOST']) ? "-- Host: $_SERVER[HTTP_HOST]\n" : '')
|
100
100
|
. "-- MySQL Server: " . $this->connection->server_info . "\n"
|
101
101
|
. "-- Database: " . $db[0] . "\n"
|
@@ -149,6 +149,7 @@ module Wordmove
|
|
149
149
|
[
|
150
150
|
WordpressDirectory::Path::WP_CONTENT,
|
151
151
|
WordpressDirectory::Path::PLUGINS,
|
152
|
+
WordpressDirectory::Path::MU_PLUGINS,
|
152
153
|
WordpressDirectory::Path::THEMES,
|
153
154
|
WordpressDirectory::Path::UPLOADS,
|
154
155
|
WordpressDirectory::Path::LANGUAGES
|
@@ -207,7 +208,7 @@ module Wordmove
|
|
207
208
|
command = ["gzip"]
|
208
209
|
command << "--best"
|
209
210
|
command << "--force"
|
210
|
-
command <<
|
211
|
+
command << "\"#{path}\""
|
211
212
|
puts command.join(" ")
|
212
213
|
command.join(" ")
|
213
214
|
end
|
@@ -216,13 +217,14 @@ module Wordmove
|
|
216
217
|
command = ["gzip"]
|
217
218
|
command << "-d"
|
218
219
|
command << "--force"
|
219
|
-
command <<
|
220
|
+
command << "\"#{path}\""
|
220
221
|
puts command.join(" ")
|
221
222
|
command.join(" ")
|
222
223
|
end
|
223
224
|
|
224
|
-
def
|
225
|
-
"
|
225
|
+
def local_delete(path)
|
226
|
+
logger.task_step true, "delete: '#{path}'"
|
227
|
+
File.delete(path)
|
226
228
|
end
|
227
229
|
|
228
230
|
def save_local_db(local_dump_path)
|
@@ -27,7 +27,7 @@ module Wordmove
|
|
27
27
|
# remove dump remotely
|
28
28
|
remote_delete(remote_dump_path)
|
29
29
|
# and locally
|
30
|
-
|
30
|
+
local_delete(local_dump_path)
|
31
31
|
end
|
32
32
|
|
33
33
|
def pull_db
|
@@ -47,7 +47,7 @@ module Wordmove
|
|
47
47
|
if options[:debug]
|
48
48
|
logger.debug "Remote dump located at: #{local_dump_path}"
|
49
49
|
else
|
50
|
-
|
50
|
+
local_delete(local_dump_path)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -121,7 +121,7 @@ module Wordmove
|
|
121
121
|
if options[:debug]
|
122
122
|
logger.debug "Operation log located at: #{temp_path}"
|
123
123
|
else
|
124
|
-
|
124
|
+
local_delete(temp_path)
|
125
125
|
end
|
126
126
|
# remove script remotely
|
127
127
|
remote_delete(remote_import_script_path)
|
@@ -13,7 +13,7 @@ module Wordmove
|
|
13
13
|
local_dump_path = local_wp_content_dir.path("dump.sql")
|
14
14
|
local_gzipped_dump_path = local_dump_path + '.gz'
|
15
15
|
local_gzipped_backup_path = local_wp_content_dir
|
16
|
-
|
16
|
+
.path("#{environment}-backup-#{Time.now.to_i}.sql.gz")
|
17
17
|
|
18
18
|
download_remote_db(local_gzipped_backup_path)
|
19
19
|
|
@@ -21,7 +21,7 @@ module Wordmove
|
|
21
21
|
adapt_sql(local_dump_path, local_options, remote_options)
|
22
22
|
run compress_command(local_dump_path)
|
23
23
|
import_remote_dump(local_gzipped_dump_path)
|
24
|
-
|
24
|
+
local_delete(local_gzipped_dump_path)
|
25
25
|
end
|
26
26
|
|
27
27
|
def pull_db
|
@@ -38,7 +38,7 @@ module Wordmove
|
|
38
38
|
run uncompress_command(local_gzipped_dump_path)
|
39
39
|
adapt_sql(local_dump_path, remote_options, local_options)
|
40
40
|
run mysql_import_command(local_dump_path, local_options[:database])
|
41
|
-
|
41
|
+
local_delete(local_dump_path)
|
42
42
|
end
|
43
43
|
|
44
44
|
private
|
data/lib/wordmove/logger.rb
CHANGED
@@ -12,18 +12,18 @@ module Wordmove
|
|
12
12
|
|
13
13
|
def task_step(local_step, title)
|
14
14
|
if local_step
|
15
|
-
puts " local".cyan + " | ".black + title
|
15
|
+
puts " local".cyan + " | ".black + title.to_s
|
16
16
|
else
|
17
|
-
puts " remote".yellow + " | ".black + title
|
17
|
+
puts " remote".yellow + " | ".black + title.to_s
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def error(message)
|
22
|
-
puts " error".red + " | ".black + message
|
22
|
+
puts " error".red + " | ".black + message.to_s
|
23
23
|
end
|
24
24
|
|
25
25
|
def debug(message)
|
26
|
-
puts " debug".magenta + " | ".black + message
|
26
|
+
puts " debug".magenta + " | ".black + message.to_s
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
data/lib/wordmove/version.rb
CHANGED
@@ -12,6 +12,7 @@ class WordpressDirectory
|
|
12
12
|
Path::WP_CONTENT => 'wp-content',
|
13
13
|
Path::WP_CONFIG => 'wp-config.php',
|
14
14
|
Path::PLUGINS => 'wp-content/plugins',
|
15
|
+
Path::MU_PLUGINS => 'wp-content/mu-plugins',
|
15
16
|
Path::THEMES => 'wp-content/themes',
|
16
17
|
Path::UPLOADS => 'wp-content/uploads',
|
17
18
|
Path::LANGUAGES => 'wp-content/languages'
|
data/wordmove.gemspec
CHANGED
@@ -6,12 +6,15 @@ require 'wordmove/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "wordmove"
|
8
8
|
spec.version = Wordmove::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
|
9
|
+
spec.authors = [
|
10
|
+
"Stefano Verna", "Ju Liu", "Fabrizio Monti", "Alessandro Fazzi", "Filippo Gangi Dino"
|
11
|
+
]
|
12
|
+
spec.email = [
|
11
13
|
"stefano.verna@welaika.com",
|
12
14
|
"ju.liu@welaika.com",
|
13
15
|
"fabrizio.monti@welaika.com",
|
14
|
-
"alessandro.fazzi@welaika.com"
|
16
|
+
"alessandro.fazzi@welaika.com",
|
17
|
+
"filippo.gangidino@welaika.com"
|
15
18
|
]
|
16
19
|
|
17
20
|
spec.summary = "Wordmove, Capistrano for Wordpress"
|
@@ -44,7 +47,7 @@ Gem::Specification.new do |spec|
|
|
44
47
|
spec.add_development_dependency "gem-release"
|
45
48
|
|
46
49
|
spec.post_install_message = <<-RAINBOW
|
47
|
-
Starting from
|
50
|
+
Starting from 2.0.0 Wordmove will compress SQL dumps both in remote and locale environments.
|
48
51
|
If something will broke, please check if gzip executable is present locally and
|
49
52
|
remotely. We are considering obvious it's installed in any web environment.
|
50
53
|
Open an issue on github at your needs.
|
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordmove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
- Ju Liu
|
9
9
|
- Fabrizio Monti
|
10
10
|
- Alessandro Fazzi
|
11
|
+
- Filippo Gangi Dino
|
11
12
|
autorequire:
|
12
13
|
bindir: exe
|
13
14
|
cert_chain: []
|
14
|
-
date: 2016-
|
15
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
15
16
|
dependencies:
|
16
17
|
- !ruby/object:Gem::Dependency
|
17
18
|
name: colorize
|
@@ -205,6 +206,7 @@ email:
|
|
205
206
|
- ju.liu@welaika.com
|
206
207
|
- fabrizio.monti@welaika.com
|
207
208
|
- alessandro.fazzi@welaika.com
|
209
|
+
- filippo.gangidino@welaika.com
|
208
210
|
executables:
|
209
211
|
- wordmove
|
210
212
|
extensions: []
|
@@ -250,7 +252,7 @@ licenses:
|
|
250
252
|
- MIT
|
251
253
|
metadata: {}
|
252
254
|
post_install_message: |2
|
253
|
-
Starting from
|
255
|
+
Starting from 2.0.0 Wordmove will compress SQL dumps both in remote and locale environments.
|
254
256
|
If something will broke, please check if gzip executable is present locally and
|
255
257
|
remotely. We are considering obvious it's installed in any web environment.
|
256
258
|
Open an issue on github at your needs.
|
@@ -264,12 +266,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
266
|
version: '2.0'
|
265
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
268
|
requirements:
|
267
|
-
- - "
|
269
|
+
- - ">="
|
268
270
|
- !ruby/object:Gem::Version
|
269
|
-
version:
|
271
|
+
version: '0'
|
270
272
|
requirements: []
|
271
273
|
rubyforge_project:
|
272
|
-
rubygems_version: 2.
|
274
|
+
rubygems_version: 2.6.1
|
273
275
|
signing_key:
|
274
276
|
specification_version: 4
|
275
277
|
summary: Wordmove, Capistrano for Wordpress
|