h2ocube_rails_tasks 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/h2ocube_rails_tasks.gemspec +1 -1
- data/lib/h2ocube_rails_tasks/tasks/postgresql.rb +2 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e331f724947da4060b1ef8bfc3e2888e04c034f
|
4
|
+
data.tar.gz: ff74a1a45015665e95d869981ab59f49165957ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f80405090df71d0cebd52a5727345029555766ddeb0fc19d95c24adbd2c10cb251c43b7ef376873a0e56784106d6ce5e688e71f43ff2793baf24e46b011c16
|
7
|
+
data.tar.gz: c72f92e01632ce463d484c23a473eb0c4d22c5d68ea8af76956070e5a74c095019a3e5469660339a04a79ea51175371095a2f5b914d1e2edb4b35ad86934ed86
|
data/h2ocube_rails_tasks.gemspec
CHANGED
@@ -5,7 +5,6 @@ if File.exist? Rails.root.join('config/database.yml')
|
|
5
5
|
db = config['database']
|
6
6
|
host = config['host']
|
7
7
|
user = config['username']
|
8
|
-
password = config['password']
|
9
8
|
FileUtils.mkdir_p Rails.root.join('postgresql')
|
10
9
|
|
11
10
|
backup = "pg_dump -h #{host} -d #{db} -U #{user} -F t -f #{Rails.root}/postgresql/dump.tar"
|
@@ -14,9 +13,9 @@ if File.exist? Rails.root.join('config/database.yml')
|
|
14
13
|
zfben_rails_rake_system backup
|
15
14
|
end
|
16
15
|
|
17
|
-
restore = "pg_restore -h #{host} -U #{user} -
|
16
|
+
restore = "pg_restore -h #{host} -U #{user} -d #{user} -O -e -n public #{Rails.root}/postgresql/dump.tar"
|
18
17
|
desc restore
|
19
|
-
task :restore => 'db:create' do
|
18
|
+
task :restore => ['db:drop', 'db:create'] do
|
20
19
|
zfben_rails_rake_system restore
|
21
20
|
end
|
22
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h2ocube_rails_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -74,3 +74,4 @@ signing_key:
|
|
74
74
|
specification_version: 4
|
75
75
|
summary: This is a plugin to add some useful tasks to rails.
|
76
76
|
test_files: []
|
77
|
+
has_rdoc:
|