effective_developer 0.6.13 → 0.6.14
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/effective_developer/version.rb +1 -1
- data/lib/tasks/pg_pull.rake +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbd086f75e05dc03da801c3bf6bcb86b258f991abde5d978a3abb3d4da58a7c2
|
4
|
+
data.tar.gz: ca825d18e1e8a26aa322a7568077b289621740433f086d6ae8884c39c2878108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd6047921324421646b30036becf8121edeaa65131d16099396a73e24ae21cac26ad9e22804ec01b589a9cd481a4c58ee7a4e8c6de73d5525ea8afd7ad4bc59c
|
7
|
+
data.tar.gz: 7d878b2634da808b13f00fcd7d857ee0b649481108f0eb1104cc99ce04079d92a5483e879a623259d4791ed713356485d25fb1442fe7a8be0384381e4284dcd4
|
data/lib/tasks/pg_pull.rake
CHANGED
@@ -130,10 +130,12 @@ namespace :pg do
|
|
130
130
|
|
131
131
|
puts "=== Loading #{args.filename} into local '#{db[:database]}' database"
|
132
132
|
|
133
|
-
|
134
|
-
|
133
|
+
command = "export PGPASSWORD=#{db[:password]}; pg_restore --no-acl --no-owner --clean --if-exists -h #{db[:host]} -U #{db[:username]} -d #{db[:database]} #{args.filename}"
|
134
|
+
|
135
|
+
if system(command)
|
136
|
+
puts "\nLoading database completed"
|
135
137
|
else
|
136
|
-
abort "
|
138
|
+
abort "\nLoading database completed with errors. It probably worked just fine."
|
137
139
|
end
|
138
140
|
end
|
139
141
|
|
@@ -183,7 +185,9 @@ namespace :pg do
|
|
183
185
|
|
184
186
|
exclude_table_data = "--exclude-table-data=logs" unless (args.logs == 'true')
|
185
187
|
|
186
|
-
|
188
|
+
command = "export PGPASSWORD=#{db[:password]}; pg_dump -Fc --no-acl --no-owner #{exclude_table_data} -h #{db[:host]} -p #{db[:port]} -U #{db[:username]} #{db[:database]} > #{args.filename}"
|
189
|
+
|
190
|
+
if system(command)
|
187
191
|
puts "Saving database completed"
|
188
192
|
else
|
189
193
|
abort "Error saving database"
|