postgressor 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/postgressor/cli.rb +7 -4
- data/lib/postgressor/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 263f317f37f9a03b530c367d7338a6a729c73a079405dde88c8a0dcf6d7ef598
|
4
|
+
data.tar.gz: e638c31d20825afb58073e39f4cb5c1c4532f80e90719ebb87600ac2bd787808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05df1a9d89da3d1287b58f890f37c94fc5e9fd3e5f32201c05fdd57553599abad7dcb083609944804b8b59b445edecc4c9f13a5dc184f2a5606726c1ac70de24
|
7
|
+
data.tar.gz: dae905bd24365a3da682036037ce20c9865a944be4d48ba004db3abbab762f700cbf7beee47d2aab1b79139c3b9eca39cc7fb55dc9b569ee86ade393b15d8127
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -86,7 +86,7 @@ Dropped database app_db
|
|
86
86
|
To perform database backup to the current directory:
|
87
87
|
|
88
88
|
```
|
89
|
-
$ DATABASE_URL="postgres://app_user:123456@localhost/app_db" VERBOSE=true postgressor dumpdb
|
89
|
+
$ DATABASE_URL="postgres://app_user:123456@localhost/app_db" VERBOSE=true postgressor dumpdb app_db.dump
|
90
90
|
|
91
91
|
Executing: PGPASSWORD=123456 pg_dump app_db -Fc --no-acl --no-owner -f app_db.dump -h localhost -U app_user
|
92
92
|
Dumped database app_db to app_db.dump file
|
data/lib/postgressor/cli.rb
CHANGED
@@ -61,14 +61,17 @@ module Postgressor
|
|
61
61
|
|
62
62
|
# https://www.postgresql.org/docs/current/app-pgdump.html
|
63
63
|
desc "dumpdb", "Dump (backup) app database"
|
64
|
-
def dumpdb
|
64
|
+
def dumpdb(dump_file_path = nil)
|
65
65
|
preload!
|
66
66
|
|
67
|
-
|
68
|
-
|
67
|
+
unless dump_file_path
|
68
|
+
dump_file_path = "#{@conf[:db]}.dump"
|
69
|
+
end
|
70
|
+
|
71
|
+
command = %W(pg_dump #{@conf[:db]} -Fc --no-acl --no-owner -f #{dump_file_path}) + @pg_cli_args
|
69
72
|
|
70
73
|
if execute command, with_env: true
|
71
|
-
say "Dumped database #{@conf[:db]} to #{
|
74
|
+
say "Dumped database #{@conf[:db]} to #{dump_file_path} file", :green
|
72
75
|
end
|
73
76
|
end
|
74
77
|
|
data/lib/postgressor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postgressor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Afanasev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -91,6 +91,7 @@ extra_rdoc_files: []
|
|
91
91
|
files:
|
92
92
|
- ".gitignore"
|
93
93
|
- ".travis.yml"
|
94
|
+
- CHANGELOG.md
|
94
95
|
- Gemfile
|
95
96
|
- LICENSE.txt
|
96
97
|
- README.md
|
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
125
|
+
rubygems_version: 3.1.2
|
125
126
|
signing_key:
|
126
127
|
specification_version: 4
|
127
128
|
summary: Manage your application Postgres user and database easily using simple CLI
|