voomify_tasks 0.1.9 → 0.2.0
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.
- data/lib/run_psql.rb +4 -2
- data/lib/tasks/sql_schema_seeds_databases.rake +1 -1
- metadata +5 -5
data/lib/run_psql.rb
CHANGED
@@ -4,7 +4,6 @@ module RunPSQL
|
|
4
4
|
end
|
5
5
|
def run_psql_file(config, filename)
|
6
6
|
file_with_path = db_file_path(filename)
|
7
|
-
puts "Executing sql file: #{file_with_path}"
|
8
7
|
run_pg_command(config, "psql -f #{file_with_path}")
|
9
8
|
end
|
10
9
|
|
@@ -15,7 +14,10 @@ module RunPSQL
|
|
15
14
|
port = config["port"]
|
16
15
|
password = config["password"]
|
17
16
|
pipe_to_file = output_file ? "> #{output_file}" : ""
|
18
|
-
|
17
|
+
variables = "-v PGPASSWORD=\"#{password}\" -v ON_ERROR_STOP=1"
|
18
|
+
puts "Executing: #{command} -U #{username} #{host ? '-h '+host : ''} #{port ? '-p '+port : ''} #{database} #{pipe_to_file}"
|
19
|
+
`#{command} #{variables} -U #{username} #{host ? '-h '+host : ''} #{port ? '-p '+port : ''} #{database} #{pipe_to_file}`
|
20
|
+
puts "exit status: #{$?.exitstatus}"
|
19
21
|
if $?.exitstatus != 0
|
20
22
|
raise "pg command failed"
|
21
23
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voomify_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Russell Edens
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-20 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|