diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-10-23 23:59:57 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-10-23 23:59:57 -0400 |
commit | 8605801052c23ea408951b4d4054cb90d9caf1f6 (patch) | |
tree | ee82b5108ccc570222ba3f0fd72418a85ca70344 /lib/sisu/v5/dbi.rb | |
parent | debian/changelog (4.2.7-1) (diff) | |
parent | v4 v5: dal, collapsed levels implemented (diff) |
Merge tag 'sisu_4.2.8' into debian/sid
SiSU 4.2.8
Diffstat (limited to 'lib/sisu/v5/dbi.rb')
-rw-r--r-- | lib/sisu/v5/dbi.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/v5/dbi.rb index cc2b614e..e59a09b7 100644 --- a/lib/sisu/v5/dbi.rb +++ b/lib/sisu/v5/dbi.rb @@ -77,22 +77,22 @@ module SiSU_DBI or @opt.mod.inspect =~/--(pg(?:sql)?|(?:sq)?lite)/ @sql_type=if @opt.cmd=~/D/ \ or @opt.mod.inspect =~/--pg(?:sql)?/ - maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/ + maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on 'pg' elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/ - maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/ + maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on 'pg' elsif @opt.cmd=~/d/ \ or @opt.mod.inspect =~/--(?:sq)?lite/ - maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/ + maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on 'sqlite' elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/ - maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/ + maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on 'sqlite' else - maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/ + maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on 'sqlite' end end @@ -107,7 +107,7 @@ module SiSU_DBI @conn=@db.psql.conn_dbi rescue if @opt.mod.inspect=~/--(createall|create)/ - cX=SiSU_Screen::Ansi.new(@opt.cmd).cX + cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX puts <<-WOK manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet exist #{cX.yellow}createdb #{@db.db}#{cX.off} @@ -129,7 +129,7 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet when /pg/; read_psql when /sqlite/; read_sqlite end - SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.act[:quiet][:set]==:on begin SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases rescue |