From c7c3ab1b867f615344cd36925d5bcd886535bb0e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 4 May 2011 23:52:51 -0400 Subject: v3: sample search form, revert to generating ruby 1.8.7 sample * sisu3 using ruby >=1.9.2p180 generates search form for ruby 1.8.7, so: generate sample form using sisu3 -F (options), then; start webrick using ruby 1.8.7 & sisu -W (not sisu3) * take account of alternative output directory structures [work on, test] --- lib/sisu/v3/cgi_pgsql.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v3/cgi_pgsql.rb') diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb index 48211068..fc802f03 100644 --- a/lib/sisu/v3/cgi_pgsql.rb +++ b/lib/sisu/v3/cgi_pgsql.rb @@ -115,12 +115,12 @@ module SiSU_CGI_pgsql a="postgresql db used for present directory: #{@db.psql.db}" b="\n\t(to create and populate postgresql database see 'man sisu' and in particular the -D flag)\n\t[the database to be used for this directory (#{@db.psql.db}) will have to be created manually if it does not exist,\n\tsee 'sisu --help sql'\n\tif you have permission to create databases:\n\t'sisu -d --createdb'\n\tor using postgresql tools directly:\n\t'createdb #{@db.psql.db}'\n\tfor a list of existing databases try 'psql --list']" SiSU_Screen::Ansi.new(@opt.cmd,a,b).txt_cyan - else puts 'failed in attempt to write sisu_pgsql.cgi to present directory, is directory writable?' + else puts 'failed in attempt to write #{@cgi_file_name} to present directory, is directory writable?' end end def header0 <<-WOK_SQL -#!/usr/bin/env ruby +#!/usr/bin/ruby1.8 =begin #{about} * Description: generates naive cgi search form for search of sisu database (pgsql) @@ -145,7 +145,7 @@ module SiSU_CGI_pgsql @l,@t,@q,@c=l,t,q,cse end def string - search={ search: [], flag: false } + search={ :search => [], :flag => false } if @t =~/\S+/ or @q =~/\S+/ if @t =~/\S+/; unescaped_search=CGI.unescape(@t) elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q) -- cgit v1.2.3