aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/se_info_env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/se_info_env.rb')
-rw-r--r--lib/sisu/v6/se_info_env.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/sisu/v6/se_info_env.rb b/lib/sisu/v6/se_info_env.rb
index a03c7d65..bda773ff 100644
--- a/lib/sisu/v6/se_info_env.rb
+++ b/lib/sisu/v6/se_info_env.rb
@@ -1634,7 +1634,7 @@ WOK
http=http.strip
end
def webserv_base_cgi(opt=nil) #web url for local webserv (localhost, or hostname)
- http=if opt.mod.inspect =~/--webserv-(?:cgi|db|search)[=-]["']?(\S+)["']+/
+ http=if opt.selections.str =~/--webserv-(?:cgi|db|search)[=-]["']?(\S+)["']+/
m=$1
(m=~/http\/\/:/) ? m : %{http://#{m}}
elsif defined? @rc['webserv_cgi']['host'] \
@@ -1708,7 +1708,7 @@ WOK
end
end
def webserv_files_from_db(opt=nil) #sort this out, messy
- if opt.mod.inspect =~/--webserv-output[=-]["']?(\S+)["']+/
+ if opt.selections.str =~/--webserv-output[=-]["']?(\S+)["']+/
m=$1
(m=~/(?:http|file\/)\/\/:/) ? m : %{http://#{m}}
else
@@ -1729,10 +1729,10 @@ WOK
#%q{http://#{ENV['HTTP_HOST']}/cgi-bin}
end
def cgi_sample_search_form_name(opt=nil)
- if opt.mod.inspect \
+ if opt.selections.str \
=~/--(?:cgi-)?search-form-name[=-]["']?(\S+?\.cgi)/
$1
- elsif not opt.mod.inspect =~/--db[=-]["']?sqlite/ \
+ elsif not opt.selections.str =~/--db[=-]["']?sqlite/ \
and defined? @rc['search'] \
and defined? @rc['search']['sisu'] \
and defined? @rc['search']['sisu']['action'] \
@@ -1740,7 +1740,7 @@ WOK
/(?:https?:\/\/\S+?)\/([^\/]+?\.cgi)$/.
match(@rc['search']['sisu']['action'])[1]
else
- (opt.mod.inspect =~/--db[=-]["']?sqlite/) \
+ (opt.selections.str =~/--db[=-]["']?sqlite/) \
? "#{Db[:name_prefix_db]}sqlite.cgi" \
: "#{Db[:name_prefix_db]}pg.cgi"
end
@@ -1783,12 +1783,12 @@ WOK
path.image_source_include
else
if @@local_image==true
- cmd=@cmd ? @cmd : ''
+ cmd=@selections.str ? @selections.str : ''
SiSU_Screen::Ansi.new(
cmd,
"WARNING - no local image directory or images:",
defaults[:image_local]
- ).warn unless cmd =~/q/
+ ).warn unless @md.opt.act[:quiet][:set]==:on
@@local_image=false
end
url.images
@@ -1813,7 +1813,7 @@ WOK
@cmd,
'WARNING - image directory for external images or no such images:',
:image_external
- ).warn unless @cmd =~/q/
+ ).warn unless @md.opt.act[:quiet][:set]==:on
@@local_image=false
end
url.images_external
@@ -1827,15 +1827,15 @@ WOK
def port
def webrick_port
if @md \
- and @md.opt.cmd.inspect=~/-F/ \
- and @md.opt.mod.inspect=~/port=(\d+)/
+ and @md.opt.act[:sample_search_form][:set]==:on \
+ and @md.opt.selections.str=~/port=(\d+)/
$1
else
if defined? @rc['webserv_cgi']['port']
if @rc['webserv_cgi']['port'].nil? \
and (defined? @md.opt.mod \
and not @md.opt.mod.nil? \
- and @md.opt.mod.inspect=~/webrick/)
+ and @md.opt.selections.str=~/webrick/)
defaults[:webserv_port_cgi]
elsif not @rc['webserv_cgi']['port'].nil?
@rc['webserv_cgi']['port']
@@ -1847,15 +1847,15 @@ WOK
end
def webserv_port_cgi(opt=nil)
port=if opt \
- and opt.cmd.inspect=~/-F/ \
- and opt.mod.inspect=~/port=(\d+)/
+ and @md.opt.act[:sample_search_form][:set]==:on \
+ and opt.selections.str=~/port=(\d+)/
$1
else
port=if defined? @rc['webserv_cgi']['port']
if @rc['webserv_cgi']['port'].nil? \
and (defined? opt.mod \
and not opt.mod.nil? \
- and opt.mod.inspect=~/webrick/)
+ and opt.selections.str=~/webrick/)
defaults[:webserv_port_cgi]
elsif not @rc['webserv_cgi']['port'].nil?
@rc['webserv_cgi']['port']
@@ -1864,7 +1864,7 @@ WOK
else
if (defined? opt.mod \
and not opt.mod.nil? \
- and opt.mod.inspect=~/webrick/)
+ and opt.selections.str=~/webrick/)
defaults[:webserv_port_cgi]
else nil
end
@@ -2145,7 +2145,7 @@ WOK
SiSU_Screen::Ansi.new(
'',
'*WARN* file not found: ' + fns_pod
- ).warn unless @cmd=~/q/
+ ).warn unless @md.opt.act[:quiet][:set]==:on
end
sisupod_processing_path
end
@@ -2164,7 +2164,7 @@ WOK
: (SiSU_Screen::Ansi.new(
'',
"*WARN* file not found: #{fns_pod}"
- ).warn unless @cmd=~/q/)
+ ).warn unless @md.opt.act[:quiet][:set]==:on)
sisupod_processing_path
end
end