rumination 0.8.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dee4296b401b146bdaae7886f80b167e100e396f
4
- data.tar.gz: e8d229aab1b52cded67329d7f4497b4767a6eab6
3
+ metadata.gz: cb61d7da6535cdcdc5f3e28ca27eef54a85f133c
4
+ data.tar.gz: 8f31b9217fcf6fc2e8de1e32bc6972e41c40fe14
5
5
  SHA512:
6
- metadata.gz: 271227420d7b2ce828ec9b78ec745db3fd83c05bf12ed5c99b3761dfb11a9c8c17392e374f9113c14bcb6a08d25c14b3e8003a30d0ee2017b76de74ea715e9d2
7
- data.tar.gz: a69c2f6ead15b24188505433bee50a726036684cd68232b432a24e1d1e8fd1978dd2ba2b517d1e276d8524d54fdfa7b804c177e1aa0675377eed023bf61d3416
6
+ metadata.gz: 71e0fa0d646a7b031cea6e63f3c3dee74c81620932fb9812d558f2bf663759e33d5171fb7986dc2bbcdc01b1050d762183851a36e08ae4d9fa0775feaf9e7166
7
+ data.tar.gz: 3a252f371f88d8ea85a7593c1099441c5d6433568b4caae38ed24143fd463847f05f824474bdeffb1e22558ca28d531bef9d1577db0d74f101d2f3c1552e9df6
@@ -5,6 +5,7 @@ module Rumination
5
5
  configure do |config|
6
6
  config.create_dump_args = %w[--compress=9]
7
7
  config.load_dump_args = %w[--quiet]
8
+ config.dumpfile_path = "db/postgres_dumps/seeds.sql.gz"
8
9
  end
9
10
 
10
11
  # include this module into something with #sh, e.g. next to Rake::FileUtils
@@ -1,12 +1,14 @@
1
1
  namespace :db do
2
2
  include Rumination::Pg::Commands
3
3
 
4
- task :create_dump => :pg_environment do
5
- create_dump dump_path, "-O"
4
+ task :create_dump, [:dumpfile_path] => :pg_environment do |t, args|
5
+ args.with_defaults dumpfile_path: Rumination.config.pg.dumpfile_path
6
+ create_dump args.dumpfile_path, "-O"
6
7
  end
7
8
 
8
- task :load_dump => :pg_environment do
9
- load_dump dump_path
9
+ task :load_dump, [:dumpfile_path] => :pg_environment do |t, args|
10
+ args.with_defaults dumpfile_path: Rumination.config.pg.dumpfile_path
11
+ load_dump args.dumpfile_path
10
12
  end
11
13
 
12
14
  task :pg_environment => :environment do
@@ -1,10 +1,6 @@
1
1
  namespace :db do
2
- def dump_path
3
- "db/postgres_dumps/seeds.sql.gz"
4
- end
5
-
6
2
  namespace :setup do
7
- if File.exists?(dump_path)
3
+ if File.exists?(Rumination.config.pg.dumpfile_path)
8
4
  task :maybe_load_dump => [:create, :load_dump, :migrate, :seed]
9
5
  else
10
6
  task :maybe_load_dump => :setup
@@ -1,3 +1,3 @@
1
1
  module Rumination
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.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.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Baguinski