aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-05-30 23:06:45 -0400
committerRalph Amissah <ralph@amissah.com>2013-05-30 23:06:45 -0400
commit462a53a0af3d35952d435716adfacda0029bddd4 (patch)
treedecbab620659d801a4dc421e53e45a4d763a7779 /lib
parentv4 v5: version & changelog (diff)
v4 v5: sysenv, pgsql db connect fix
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/sysenv.rb8
-rw-r--r--lib/sisu/v5/sysenv.rb8
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index 6bc97396..f95622b5 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -4067,10 +4067,12 @@ WOK
self
end
def psql
- def user(opt)
- if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/
+ def user(opt=nil)
+ x=if opt \
+ and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/
m=$1
- elsif opt.mod =~/--webserv[=-]webrick/
+ elsif opt \
+ and opt.mod =~/--webserv[=-]webrick/
@env.user
else
((defined? @rc['db']['postgresql']['user']) \
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb
index edaec7f8..37492716 100644
--- a/lib/sisu/v5/sysenv.rb
+++ b/lib/sisu/v5/sysenv.rb
@@ -4067,10 +4067,12 @@ WOK
self
end
def psql
- def user(opt)
- if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/
+ def user(opt=nil)
+ x=if opt \
+ and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/
m=$1
- elsif opt.mod =~/--webserv[=-]webrick/
+ elsif opt \
+ and opt.mod =~/--webserv[=-]webrick/
@env.user
else
((defined? @rc['db']['postgresql']['user']) \