voomify_tasks 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/run_psql.rb +6 -3
  2. metadata +4 -4
data/lib/run_psql.rb CHANGED
@@ -14,11 +14,14 @@ module RunPSQL
14
14
  port = config["port"]
15
15
  password = config["password"]
16
16
  pipe_to_file = output_file ? "> #{output_file}" : ""
17
- variables = "-v PGPASSWORD=\"#{password}\" -v ON_ERROR_STOP=1"
17
+ variables = "-v ON_ERROR_STOP=1"
18
18
  puts "Executing: #{command} -U #{username} #{host ? '-h '+host : ''} #{port ? '-p '+port.to_s : ''} #{database} #{pipe_to_file}"
19
+ `export PGPASSWORD="#{password}"`
19
20
  `#{command} #{variables} -U #{username} #{host ? '-h '+host : ''} #{port ? '-p '+port.to_s : ''} #{database} #{pipe_to_file}`
20
- puts "exit status: #{$?.exitstatus}"
21
- if $?.exitstatus != 0
21
+ exit_status = $?.exitstatus
22
+ `export PGPASSWORD=""`
23
+ puts "exit status: #{exit_status}"
24
+ if exit_status != 0
22
25
  raise "pg command failed"
23
26
  end
24
27
  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: 17
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
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-23 00:00:00 -04:00
18
+ date: 2011-04-11 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21