capistrano3-postgres 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98eadadd989d6092c76aee573e1307d96af1ed9a
4
- data.tar.gz: 46ab9e6a5d382febadc2a6267c63a5b8d626b9bd
3
+ metadata.gz: 4a3a110edbbe9a631690e324e2fe5402e444de96
4
+ data.tar.gz: f5b91f729e650b86a166a5c4b8703227f98625ad
5
5
  SHA512:
6
- metadata.gz: a22da966f93180428de06d40cc73747bff99dd31f57c3e48e89fc5b8d2cceeda5a3b51b89716ea341c9c1284eb54d506f6e77aec9f5c7d1bc7199aeececd3b22
7
- data.tar.gz: 70a4e5e92d5268b3fa3c70727bd2917e6e964c1b0ecb8e3e14cae1161f6cb2c6806324f83ba4131646d1c0a6c9c8d18915914ff0ce062f48a83e2f2420f5ae39
6
+ metadata.gz: da5572d5f31aa6a3db436d9684760c22129ef75cfa80cf3a81a77feead971cc620eff0e7524ddcb49438f44d8503a1aadae6ada3eea6c41f33dc96067ffa536c
7
+ data.tar.gz: b34dfa9ef2b055d4d24349487ecb08eff84f73041e500125ccf394654adef4d6cb9a66799142acf50481bbb77475a14d5185cfd4a45de58c9dc2a094d4e7642a
data/README.md CHANGED
@@ -48,6 +48,11 @@ All downloaded dump files will be deleted after importing. If you want to keep t
48
48
  set :postgres_keep_local_dumps, 5 # Will keep 5 last dump files.
49
49
  ```
50
50
 
51
+ To save on disk space, you can set the compression level. Gzip 0-9 are supported, default is 0:
52
+ ```
53
+ set :postgres_backup_compression_level, 6 # Will use gzip level 6 to compress the output.
54
+ ```
55
+
51
56
  ## Contributing
52
57
 
53
58
  1. Fork it ( http://github.com/spilin/capistrano3-postgres/fork )
@@ -1,5 +1,5 @@
1
1
  module Capistrano3
2
2
  module Postgres
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -4,6 +4,7 @@ namespace :load do
4
4
  set :postgres_role, :db
5
5
  set :postgres_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
6
6
  set :postgres_keep_local_dumps, 0
7
+ set :postgres_backup_compression_level, 0
7
8
  set :postgres_remote_sqlc_file_path, -> { nil }
8
9
  set :postgres_local_database_config, -> { nil }
9
10
  set :postgres_remote_database_config, -> { nil }
@@ -25,7 +26,7 @@ namespace :postgres do
25
26
  set :postgres_remote_sqlc_file_path, "#{shared_path}/#{fetch(:postgres_backup_dir)}/#{file_name}"
26
27
  end
27
28
 
28
- execute "PGPASSWORD=#{config['password']} pg_dump #{user_option(config)} -h #{config['host']} -Fc --file=#{fetch(:postgres_remote_sqlc_file_path)} #{config['database']}"
29
+ execute "PGPASSWORD=#{config['password']} pg_dump #{user_option(config)} -h #{config['host']} -Fc --file=#{fetch(:postgres_remote_sqlc_file_path)} -Z #{fetch(:postgres_backup_compression_level)} #{config['database']}"
29
30
  end
30
31
  end
31
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Krasynskyi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-03 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.2.0
64
+ rubygems_version: 2.4.5.1
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Create, download and restore postgres database.