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 +4 -4
- data/lib/rumination/pg/commands.rb +1 -0
- data/lib/rumination/tasks/db/dump.rake +6 -4
- data/lib/rumination/tasks/db/setup.rake +1 -5
- 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: cb61d7da6535cdcdc5f3e28ca27eef54a85f133c
|
4
|
+
data.tar.gz: 8f31b9217fcf6fc2e8de1e32bc6972e41c40fe14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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?(
|
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
|
data/lib/rumination/version.rb
CHANGED