wordmove 1.1.0 → 1.2.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/.gitignore +16 -3
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -1
- data/README.mdown +10 -0
- data/lib/wordmove/assets/dump.php.erb +7 -3
- data/lib/wordmove/assets/import.php.erb +6 -2
- data/lib/wordmove/deployer/base.rb +4 -0
- data/lib/wordmove/deployer/ftp.rb +2 -0
- data/lib/wordmove/generators/Movefile +1 -0
- data/lib/wordmove/version.rb +1 -1
- data/wordmove.gemspec +1 -0
- metadata +39 -32
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60ff5cc828eb2578676cbb8b3d9d32806eabbd16
|
4
|
+
data.tar.gz: 3c183cd2e044f6e3658c1715761117e72bd005bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95c2773c42c25bfbf78a75e3f187b0290a20a2c9869d2b319a21015552243ba3dc6e565296e7aa21bd9422badffc8ada4a5be6fedae6b4a96fc92d192c517885
|
7
|
+
data.tar.gz: 3dff2fd6bc8b94a3f46c0f26f0fe728edfacd635a4ab4da2780b40a1de13a6eaa87b1a9dcd646322172e8480cc13e46ad485f85cdfba885a72734404eb82f549
|
data/.gitignore
CHANGED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
wordmove
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.1
|
data/README.mdown
CHANGED
@@ -67,6 +67,7 @@ staging:
|
|
67
67
|
user: "user"
|
68
68
|
password: "password"
|
69
69
|
host: "host"
|
70
|
+
# port: "3308" # Use just in case you have exotic server config
|
70
71
|
|
71
72
|
exclude:
|
72
73
|
- ".git/"
|
@@ -130,6 +131,15 @@ machine. Then in the remote host section in your Movefile:
|
|
130
131
|
### If you want to specify a passive FTP connection
|
131
132
|
Add to the YAML config a `passive` flag set to `true`.
|
132
133
|
|
134
|
+
### Problems with server's certificate
|
135
|
+
If server's certificate is not signed by a known Certificate Authority, you can disable `lftp` check by adding
|
136
|
+
`set ssl:verify-certificate no` to your `~/.lftprc` or `~/.lftp/rc`
|
137
|
+
|
138
|
+
If host name used to connect to the server does not corresponds to the host name in its certificate, you can disable
|
139
|
+
`lftp` check by adding `set ssl:check-hostname no` to your `~/.lftprc` or `~/.lftp/rc`
|
140
|
+
|
141
|
+
More `lftp` [configuration flags here.](https://gist.github.com/gaubert/822090)
|
142
|
+
|
133
143
|
### How the heck you are able to sync the DB via FTP?
|
134
144
|
We're glad you asked! We basically upload via FTP a PHP script that performs the various
|
135
145
|
import/export operations. This script then gets executed via HTTP. Don't worry
|
@@ -153,8 +153,8 @@ class MySQLDump
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
|
156
|
-
function get_connection($db_host, $db_user, $db_password, $db_name, &$error = NULL) {
|
157
|
-
$db_connection = new mysqli($db_host, $db_user, $db_password);
|
156
|
+
function get_connection($db_host, $db_user, $db_password, $db_name, $db_port, &$error = NULL) {
|
157
|
+
$db_connection = new mysqli($db_host, $db_user, $db_password, $db_name, $db_port);
|
158
158
|
if (!$db_connection || !$db_connection->select_db($db_name)) {
|
159
159
|
if ($db_connection) {
|
160
160
|
$error = mysqli_connect_error();
|
@@ -167,6 +167,10 @@ function get_connection($db_host, $db_user, $db_password, $db_name, &$error = NU
|
|
167
167
|
}
|
168
168
|
|
169
169
|
$db_host = '<%= escape_php db[:host] %>';
|
170
|
+
$db_port = '<%= escape_php db[:port] %>';
|
171
|
+
if (!$db_port) {
|
172
|
+
$db_port = ini_get("mysqli.default_port");
|
173
|
+
}
|
170
174
|
$db_user = '<%= escape_php db[:user] %>';
|
171
175
|
$db_password = '<%= escape_php db[:password] %>';
|
172
176
|
$db_name = '<%= escape_php db[:name] %>';
|
@@ -175,7 +179,7 @@ $shared_key = '<%= password %>';
|
|
175
179
|
$mysql_error = '';
|
176
180
|
|
177
181
|
if ($_GET['shared_key'] == $shared_key) {
|
178
|
-
$connection = get_connection($db_host, $db_user, $db_password, $db_name, $mysql_error);
|
182
|
+
$connection = get_connection($db_host, $db_user, $db_password, $db_name, $db_port, $mysql_error);
|
179
183
|
$dump = new MySQLDump($connection);
|
180
184
|
$dump->send('dump.mysql');
|
181
185
|
}
|
@@ -9,7 +9,11 @@ if ($_GET['shared_key'] != $shared_key) {
|
|
9
9
|
|
10
10
|
// Database configuration
|
11
11
|
|
12
|
-
$
|
12
|
+
$db_port = '<%= escape_php db[:port] %>';
|
13
|
+
if (!$db_port) {
|
14
|
+
$db_port = ini_get("mysqli.default_port");
|
15
|
+
}
|
16
|
+
$db_server = '<%= escape_php db[:host] %>:' . $db_port;
|
13
17
|
$db_user = '<%= escape_php db[:user] %>';
|
14
18
|
$db_password = '<%= escape_php db[:password] %>';
|
15
19
|
$db_name = '<%= escape_php db[:name] %>';
|
@@ -324,7 +328,7 @@ if (!$error && isset($_REQUEST["delete"]) && $_REQUEST["delete"]!=basename($_SER
|
|
324
328
|
// Connect to the database, set charset and execute pre-queries
|
325
329
|
|
326
330
|
if (!$error && !TESTMODE)
|
327
|
-
{ $dbconnection = @mysql_connect($db_server
|
331
|
+
{ $dbconnection = @mysql_connect($db_server, $db_user, $db_password);
|
328
332
|
if ($dbconnection)
|
329
333
|
$db = mysql_select_db($db_name);
|
330
334
|
if (!$dbconnection || !$db)
|
@@ -1,9 +1,11 @@
|
|
1
|
+
require 'active_support'
|
1
2
|
require 'active_support/core_ext'
|
2
3
|
require 'wordmove/core_ext'
|
3
4
|
require 'wordmove/logger'
|
4
5
|
require 'wordmove/wordpress_directory'
|
5
6
|
require 'wordmove/sql_adapter'
|
6
7
|
require 'escape'
|
8
|
+
require 'yaml'
|
7
9
|
|
8
10
|
module Wordmove
|
9
11
|
module Deployer
|
@@ -185,6 +187,7 @@ module Wordmove
|
|
185
187
|
def mysql_dump_command(options, save_to_path)
|
186
188
|
arguments = [ "mysqldump" ]
|
187
189
|
arguments << "--host=#{options[:host]}" if options[:host].present?
|
190
|
+
arguments << "--port=#{options[:port]}" if options[:port].present?
|
188
191
|
arguments << "--user=#{options[:user]}" if options[:user].present?
|
189
192
|
arguments << "--password=#{options[:password]}" if options[:password].present?
|
190
193
|
arguments << "--default-character-set=#{options[:charset]}" if options[:charset].present?
|
@@ -195,6 +198,7 @@ module Wordmove
|
|
195
198
|
def mysql_import_command(dump_path, options)
|
196
199
|
arguments = [ "mysql" ]
|
197
200
|
arguments << "--host=#{options[:host]}" if options[:host].present?
|
201
|
+
arguments << "--port=#{options[:port]}" if options[:port].present?
|
198
202
|
arguments << "--user=#{options[:user]}" if options[:user].present?
|
199
203
|
arguments << "--password=#{options[:password]}" if options[:password].present?
|
200
204
|
arguments << "--database=#{options[:name]}"
|
data/lib/wordmove/version.rb
CHANGED
data/wordmove.gemspec
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: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -9,104 +9,118 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colored
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: thor
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: activesupport
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: i18n
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: photocopier
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 0.0.10
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 0.0.10
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: escape
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: rspec
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
101
115
|
requirements:
|
102
|
-
- -
|
116
|
+
- - ">="
|
103
117
|
- !ruby/object:Gem::Version
|
104
118
|
version: '0'
|
105
119
|
type: :development
|
106
120
|
prerelease: false
|
107
121
|
version_requirements: !ruby/object:Gem::Requirement
|
108
122
|
requirements:
|
109
|
-
- -
|
123
|
+
- - ">="
|
110
124
|
- !ruby/object:Gem::Version
|
111
125
|
version: '0'
|
112
126
|
description: Wordmove deploys your WordPress websites at the speed of light.
|
@@ -118,13 +132,12 @@ executables:
|
|
118
132
|
extensions: []
|
119
133
|
extra_rdoc_files: []
|
120
134
|
files:
|
121
|
-
- .gitignore
|
122
|
-
- .rspec
|
123
|
-
- .ruby-
|
124
|
-
- .
|
125
|
-
- .travis.yml
|
135
|
+
- ".gitignore"
|
136
|
+
- ".rspec"
|
137
|
+
- ".ruby-gemset"
|
138
|
+
- ".ruby-version"
|
139
|
+
- ".travis.yml"
|
126
140
|
- Gemfile
|
127
|
-
- Gemfile.lock
|
128
141
|
- README.mdown
|
129
142
|
- Rakefile
|
130
143
|
- bin/wordmove
|
@@ -170,25 +183,19 @@ require_paths:
|
|
170
183
|
- lib
|
171
184
|
required_ruby_version: !ruby/object:Gem::Requirement
|
172
185
|
requirements:
|
173
|
-
- -
|
186
|
+
- - ">="
|
174
187
|
- !ruby/object:Gem::Version
|
175
188
|
version: '0'
|
176
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
190
|
requirements:
|
178
|
-
- -
|
191
|
+
- - ">="
|
179
192
|
- !ruby/object:Gem::Version
|
180
193
|
version: '0'
|
181
194
|
requirements: []
|
182
195
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.2.2
|
184
197
|
signing_key:
|
185
198
|
specification_version: 4
|
186
199
|
summary: Wordmove, Capistrano for Wordpress
|
187
|
-
test_files:
|
188
|
-
- spec/deployer/base_spec.rb
|
189
|
-
- spec/features/movefile_spec.rb
|
190
|
-
- spec/fixtures/Movefile
|
191
|
-
- spec/fixtures/wp-config.php
|
192
|
-
- spec/spec_helper.rb
|
193
|
-
- spec/sql_adapter_spec.rb
|
200
|
+
test_files: []
|
194
201
|
has_rdoc:
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.9.2@wordmove
|
data/Gemfile.lock
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
wordmove (1.1.0)
|
5
|
-
activesupport
|
6
|
-
colored
|
7
|
-
i18n
|
8
|
-
photocopier (~> 0.0.10)
|
9
|
-
rake
|
10
|
-
thor
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: http://rubygems.org/
|
14
|
-
specs:
|
15
|
-
activesupport (4.0.0)
|
16
|
-
i18n (~> 0.6, >= 0.6.4)
|
17
|
-
minitest (~> 4.2)
|
18
|
-
multi_json (~> 1.3)
|
19
|
-
thread_safe (~> 0.1)
|
20
|
-
tzinfo (~> 0.3.37)
|
21
|
-
atomic (1.1.13)
|
22
|
-
colored (1.2)
|
23
|
-
diff-lcs (1.2.4)
|
24
|
-
escape (0.0.4)
|
25
|
-
i18n (0.6.5)
|
26
|
-
minitest (4.7.5)
|
27
|
-
multi_json (1.8.0)
|
28
|
-
net-scp (1.1.2)
|
29
|
-
net-ssh (>= 2.6.5)
|
30
|
-
net-ssh (2.6.8)
|
31
|
-
net-ssh-gateway (1.2.0)
|
32
|
-
net-ssh (>= 2.6.5)
|
33
|
-
photocopier (0.0.10)
|
34
|
-
activesupport
|
35
|
-
escape
|
36
|
-
i18n
|
37
|
-
net-scp
|
38
|
-
net-ssh
|
39
|
-
net-ssh-gateway
|
40
|
-
rake (10.1.0)
|
41
|
-
rspec (2.14.1)
|
42
|
-
rspec-core (~> 2.14.0)
|
43
|
-
rspec-expectations (~> 2.14.0)
|
44
|
-
rspec-mocks (~> 2.14.0)
|
45
|
-
rspec-core (2.14.5)
|
46
|
-
rspec-expectations (2.14.2)
|
47
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
48
|
-
rspec-mocks (2.14.3)
|
49
|
-
thor (0.18.1)
|
50
|
-
thread_safe (0.1.2)
|
51
|
-
atomic
|
52
|
-
tzinfo (0.3.37)
|
53
|
-
|
54
|
-
PLATFORMS
|
55
|
-
ruby
|
56
|
-
|
57
|
-
DEPENDENCIES
|
58
|
-
rspec
|
59
|
-
wordmove!
|