rumination 0.5.0 → 0.5.1
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/lib/rumination/pg/commands.rb +5 -11
- data/lib/rumination/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b727653a5dfeeb6f0a28ee835616c72704fae408
|
|
4
|
+
data.tar.gz: cdd78d49f11d2a9cc16057e3753fb2a69632180c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a43ae4b1b0d6ac175f6d512a707b6beabcee26a5d3850fe832bff65f576086cb49cc5e12793f16015be1b9936e89cb4e0898ec7cde7e1753e06a35c5ade0325
|
|
7
|
+
data.tar.gz: 38b5fd92a7fa6b7076a6ca08fc116d57024eca2afa0119a796882e69eb2b479a3d70ffd0b1d045246e696641b7dc89f52733df19b0aca64e7ed826f7bcaed835
|
|
@@ -4,14 +4,11 @@ module Rumination
|
|
|
4
4
|
module Pg
|
|
5
5
|
configure do |config|
|
|
6
6
|
config.create_dump_args = %w[--compress=9]
|
|
7
|
+
config.load_dump_args = %w[--quiet]
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
# include this module into something with #sh, e.g. next to Rake::FileUtils
|
|
10
11
|
module Commands
|
|
11
|
-
def pg_dump *args
|
|
12
|
-
sh "pg_dump #{args.join(" ")}"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
12
|
def pg_restore *args
|
|
16
13
|
Pg::Restore.call *args, "-d", ENV["PGDATABASE"]
|
|
17
14
|
end
|
|
@@ -21,16 +18,13 @@ module Rumination
|
|
|
21
18
|
end
|
|
22
19
|
|
|
23
20
|
def create_dump path, *args
|
|
24
|
-
args = [
|
|
25
|
-
*required_create_dump_args,
|
|
26
|
-
*Pg.config.create_dump_args,
|
|
27
|
-
*args,
|
|
28
|
-
"--file=#{path}"]
|
|
21
|
+
args = Pg.config.create_dump_args + args + %W[--file=#{path}]
|
|
29
22
|
sh "pg_dump #{args.join(" ")}"
|
|
30
23
|
end
|
|
31
24
|
|
|
32
|
-
def
|
|
33
|
-
|
|
25
|
+
def load_dump path, *args
|
|
26
|
+
args = Pg.config.load_dump_args + args
|
|
27
|
+
sh "gunzip -c #{path} | psql #{args.join(" ")}"
|
|
34
28
|
end
|
|
35
29
|
end
|
|
36
30
|
end
|
data/lib/rumination/version.rb
CHANGED