dblink 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dblink +4 -0
- data/dblink.gemspec +1 -1
- data/lib/dblink/pg_bouncer_runner.rb +3 -2
- data/lib/dblink/psql_runner.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: d33123b9683b534b242cd40b89464add84043041
|
4
|
+
data.tar.gz: 0f32925cd53bd6de9166f48946e0ded77f57f1d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c88ec2760b432e44a777c9bab248d82aa011f94e734db78238cf1642d41ed5f435b247c0b08ea7978b6f025e00193ef06b50bba314f4ba719c5a715e38aaff2
|
7
|
+
data.tar.gz: d8815d622451edefa18aa8df78f63146afda7136ab8c85604470c0c72c6f3c38f240a7c2084ddb60d15f61164909de35ec35fa9c9e1ba649f68227cde5ec7287
|
data/bin/dblink
CHANGED
@@ -71,6 +71,10 @@ OptionParser.new do |opts|
|
|
71
71
|
CLI_OPTS[:check_tonnel] = value
|
72
72
|
end
|
73
73
|
|
74
|
+
opts.on("--pgbouncer-user [USER]", "PgBouncer can not run as root") do |value|
|
75
|
+
CLI_OPTS[:pgbouncer_user] = value
|
76
|
+
end
|
77
|
+
|
74
78
|
opts.on_tail("-h", "--help", "Show this message") do
|
75
79
|
puts opts
|
76
80
|
exit
|
data/dblink.gemspec
CHANGED
@@ -18,7 +18,8 @@ class PgBouncerRunner
|
|
18
18
|
create_config unless @tmp_folder
|
19
19
|
|
20
20
|
verbose_arg = @verbose ? '-v' : ''
|
21
|
-
|
21
|
+
pgb_user_arg = CLI_OPTS[:pgbouncer_user] ? "-u #{CLI_OPTS[:pgbouncer_user]}" : ""
|
22
|
+
pgb_command = "#{pgbouncer_path} #{verbose_arg} #{pgb_user_arg} ./config.ini"
|
22
23
|
|
23
24
|
if @verbose
|
24
25
|
puts "Running pgbouncer with config at: #{@tmp_folder}"
|
@@ -66,7 +67,7 @@ class PgBouncerRunner
|
|
66
67
|
puts "Please install it"
|
67
68
|
exit(1)
|
68
69
|
else
|
69
|
-
return path
|
70
|
+
return path.strip
|
70
71
|
end
|
71
72
|
|
72
73
|
end
|
data/lib/dblink/psql_runner.rb
CHANGED
@@ -40,7 +40,7 @@ module PsqlRunner
|
|
40
40
|
path = 'psql'
|
41
41
|
elsif RUBY_PLATFORM =~ /darwin/
|
42
42
|
paths = Dir.glob('/Applications/Postgres.app/Contents/Versions/**/psql')
|
43
|
-
path = paths.last if paths.size > 0
|
43
|
+
path = paths.last.strip if paths.size > 0
|
44
44
|
end
|
45
45
|
|
46
46
|
path == '' ? nil : path
|