wordpress-deploy 1.0.0.rc4 → 1.0.0.rc5

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.
@@ -1,6 +1,7 @@
1
1
  require 'tempfile'
2
2
  require 'mysql2'
3
3
  require 'php_serialize'
4
+ require 'shellwords'
4
5
 
5
6
  module WordpressDeploy
6
7
  module Database
@@ -296,7 +297,7 @@ module WordpressDeploy
296
297
  private
297
298
 
298
299
  def mysqldump
299
- arguments = "-P \"#{port}\" -h \"#{host}\" -u \"#{user}\" -p\"#{password}\" -B \"#{name}\""
300
+ arguments = "-P \"#{port}\" -h \"#{host}\" -u \"#{user}\" -p\"#{Shellwords.escape(password)}\" -B \"#{name}\""
300
301
  "#{utility("mysqldump")} #{arguments}"
301
302
  end
302
303
 
@@ -306,7 +307,7 @@ module WordpressDeploy
306
307
  arg_user = database.user
307
308
  arg_pass = database.password
308
309
  arg_name = database.name
309
- arguments = "-P \"#{arg_port}\" -u \"#{arg_user}\" -h \"#{arg_host}\" -p\"#{arg_pass}\" -D \"#{arg_name}\""
310
+ arguments = "-P \"#{arg_port}\" -u \"#{arg_user}\" -h \"#{arg_host}\" -p\"#{Shellwords.escape(arg_pass)}\" -D \"#{arg_name}\""
310
311
 
311
312
  "#{utility("mysql")} #{arguments} < #{file_name}"
312
313
  end
@@ -1,3 +1,3 @@
1
1
  module WordpressDeploy
2
- VERSION = "1.0.0.rc4"
2
+ VERSION = "1.0.0.rc5"
3
3
  end
@@ -34,11 +34,11 @@ describe WordpressDeploy::Cli::Utility do
34
34
  WordpressDeploy::Environments.should_receive(:find).once.with(:development).and_return(from)
35
35
  WordpressDeploy::Environments.should_receive(:find).once.with(:production).and_return(to)
36
36
 
37
- from.should_receive(:database)
38
-
39
- to.should_receive(:save_wp_config)
40
- to.should_receive(:transmit)
41
- to.should_receive(:datbase)
37
+ from.should_receive(:save_wp_config)
38
+ from.stub_chain(:transfer, :transmit!)
39
+ from.stub_chain(:database, :save!)
40
+ from.stub_chain(:database, :send!).with(to)
41
+ from.stub_chain(:database, :migrate!).with(to)
42
42
 
43
43
  # Execute the command
44
44
  args = ["deploy", "development", "production"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordpress-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc4
4
+ version: 1.0.0.rc5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 1117161983525206515
221
+ hash: 1709705024231697767
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  none: false
224
224
  requirements: