rumination 0.5.0 → 0.5.1

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: 0db5d68d2b39a3131c4cedd39b254bf3c15212f3
4
- data.tar.gz: ca20cd5fe3da6ac39e3b3c6444d4b898d3d9959f
3
+ metadata.gz: b727653a5dfeeb6f0a28ee835616c72704fae408
4
+ data.tar.gz: cdd78d49f11d2a9cc16057e3753fb2a69632180c
5
5
  SHA512:
6
- metadata.gz: b6e3a00bb7fcb167d721a3a3b711ee4daa7e2d134be752e2f2c8664aaee30095726a67279d0d839b73b79e585c4faaf44af60474ea63f9d2ceb8b8218e2979ac
7
- data.tar.gz: 18e70fc8f12cfa4cde0286d27a16ef2b4648f845ee53116517830cef14396853c8e960bcaf2ce8c7b4d9c36cd6477f30c7941891fb8336462227f5886d4fd236
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 required_create_dump_args
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
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski