wordmove 1.4.0.pre2 → 1.4.0.pre3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33285baf64646768c1c8d392b23bac0b1fd1e2de
4
- data.tar.gz: f49b9d7e9c054faf98d05cc5865ad45b9e8d1ea0
3
+ metadata.gz: 30f0f1c3e597116883ad1c3fdf57619d8913d8dd
4
+ data.tar.gz: cde49c73138cf4ffe664ec5d2753dbe2828104e6
5
5
  SHA512:
6
- metadata.gz: af73d79c48aa498fb61d7c2e7268ccd605290df440c9f9afabf19ff8c36cf7293477ef1183d4149ff75d9936aee2e4cf0b6625066b59d178c308e3aa85990c57
7
- data.tar.gz: eda4854ee0f42be50e108b0c6db0746fa1b09385b6c6bf54f2f57dc82d97662744b1e2fbca4f420c23a3bd3d1cfc9a98e3411b49f2ef4ca72a28e05228b61efd
6
+ metadata.gz: 920eaa8541ab7db044c9dccc69292997a9eb62541856b76866e1b6a4c1959faeaebd4c18a32a67e2dba452b83a9fa2fbb43d153eebe1b11d60dd1b54491c0c44
7
+ data.tar.gz: c35cb6338b9431d991ae119729a81731e044804f017ded394c2ffe803ae00f7332634cd70569bd478e651a0cf4fd75885eb9df9091a7456879784ca1935c4ef3
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .DS_Store
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
- - 2.1.6
5
- - 2.2.2
4
+ - 2.1.7
5
+ - 2.2.3
data/CHANGELOG.md CHANGED
@@ -2,11 +2,17 @@
2
2
  - Implemented compression of sql files before and after transfers
3
3
  - Implemented compression of sql backup files inside wp-content
4
4
  - Implemented support to mu-plugins directory. Thanks connormckelvey
5
+ - Update `dump.php` library to support database VIEWS
6
+
7
+
8
+ # 1.3.1
9
+ - Fix typo in dump.php.erb
10
+
5
11
  # 1.3.0
6
- - fix UTF-8 encoding issue when `wordmove init` with a wrong .sample file
7
- - fix problem with ftp password and special chars
8
- - fix duplicated wordpress tree in languages folder (ftp only)
9
- - update db import / export php libraries
10
- - add `--version` option
11
- - required ruby version ~> 2.0
12
- - updated test suite with rspec 3.x
12
+ - Fix UTF-8 encoding issue when `wordmove init` with a wrong .sample file
13
+ - Fix problem with ftp password and special chars
14
+ - Fix duplicated wordpress tree in languages folder (ftp only)
15
+ - Update db import / export php libraries
16
+ - Add `--version` option
17
+ - Required ruby version ~> 2.0
18
+ - Updated test suite with rspec 3.x
@@ -37,7 +37,7 @@ class MySQLDump
37
37
  * Connects to database.
38
38
  * @param mysqli connection
39
39
  */
40
- public function __construct(mysqli $connection, $charset = 'utf8'
40
+ public function __construct(mysqli $connection, $charset = 'utf8')
41
41
  {
42
42
  $this->connection = $connection;
43
43
 
@@ -78,14 +78,20 @@ class MySQLDump
78
78
  throw new Exception('Argument must be stream resource.');
79
79
  }
80
80
 
81
- $tables = array();
81
+ $tables = $views = array();
82
82
 
83
- $res = $this->connection->query('SHOW TABLES');
83
+ $res = $this->connection->query('SHOW FULL TABLES');
84
84
  while ($row = $res->fetch_row()) {
85
- $tables[] = $row[0];
85
+ if ($row[1] === 'VIEW') {
86
+ $views[] = $row[0];
87
+ } else {
88
+ $tables[] = $row[0];
89
+ }
86
90
  }
87
91
  $res->close();
88
92
 
93
+ $tables = array_merge($tables, $views); // views must be last
94
+
89
95
  $this->connection->query('LOCK TABLES `' . implode('` READ, `', $tables) . '` READ');
90
96
 
91
97
  $db = $this->connection->query('SELECT DATABASE()')->fetch_row();
@@ -216,8 +222,7 @@ if (!$db_port) {
216
222
  $db_user = '<%= escape_php db[:user] %>';
217
223
  $db_password = '<%= escape_php db[:password] %>';
218
224
  $db_name = '<%= escape_php db[:name] %>';
219
- $db_charset = '<%= escape_php db[:charset] %>';
220
225
 
221
226
  $connection = new mysqli($db_host, $db_user, $db_password, $db_name, $db_port);
222
- $dump = new MySQLDump($connection, $db_charset);
227
+ $dump = new MySQLDump($connection);
223
228
  $dump->save('dump.mysql');
@@ -1,3 +1,3 @@
1
1
  module Wordmove
2
- VERSION = "1.4.0.pre2"
2
+ VERSION = "1.4.0.pre3"
3
3
  end
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: 1.4.0.pre2
4
+ version: 1.4.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2015-08-28 00:00:00.000000000 Z
14
+ date: 2015-08-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: colorize