capistrano-wpcli 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,10 +10,10 @@ namespace :load do
10
10
 
11
11
  # A local temp dir which is read and writeable
12
12
  set :local_tmp_dir, "/tmp"
13
-
13
+
14
14
  # Temporal db dumps path
15
- set :wpcli_remote_db_file, "#{fetch(:tmp_dir)}/wpcli_database.sql"
16
- set :wpcli_local_db_file, "#{fetch(:local_tmp_dir)}/wpcli_database.sql"
15
+ set :wpcli_remote_db_file, "#{fetch(:tmp_dir)}/wpcli_database.sql.gz"
16
+ set :wpcli_local_db_file, "#{fetch(:local_tmp_dir)}/wpcli_database.sql.gz"
17
17
  end
18
18
  end
19
19
 
@@ -23,13 +23,13 @@ namespace :wpcli do
23
23
  task :pull do
24
24
  on roles(:web) do
25
25
  within release_path do
26
- execute :wp, :db, :export, fetch(:wpcli_remote_db_file)
26
+ execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_remote_db_file)
27
27
  download! fetch(:wpcli_remote_db_file), fetch(:wpcli_local_db_file)
28
28
  execute :rm, fetch(:wpcli_remote_db_file)
29
29
  end
30
30
 
31
31
  run_locally do
32
- execute :wp, :db, :import, fetch(:wpcli_local_db_file)
32
+ execute :gunzip, "<", fetch(:wpcli_local_db_file), "|", :wp, :db, :import, "-"
33
33
  execute :rm, fetch(:wpcli_local_db_file)
34
34
  execute :wp, "search-replace", fetch(:wpcli_remote_url), fetch(:wpcli_local_url), fetch(:wpcli_args) || "--skip-columns=guid"
35
35
  end
@@ -40,7 +40,7 @@ namespace :wpcli do
40
40
  task :push do
41
41
  on roles(:web) do
42
42
  run_locally do
43
- execute :wp, :db, :export, fetch(:wpcli_local_db_file)
43
+ execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_local_db_file)
44
44
  end
45
45
 
46
46
  upload! fetch(:wpcli_local_db_file), fetch(:wpcli_remote_db_file)
@@ -50,11 +50,11 @@ namespace :wpcli do
50
50
  end
51
51
 
52
52
  within release_path do
53
- execute :wp, :db, :import, fetch(:wpcli_remote_db_file)
53
+ execute :gunzip, "<", fetch(:wpcli_remote_db_file), "|", :wp, :db, :import, "-"
54
54
  execute :rm, fetch(:wpcli_remote_db_file)
55
55
  execute :wp, "search-replace", fetch(:wpcli_local_url), fetch(:wpcli_remote_url), fetch(:wpcli_args) || "--skip-columns=guid"
56
56
  end
57
57
  end
58
58
  end
59
59
  end
60
- end
60
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Wpcli
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-wpcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: