webink 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/rfcgi +15 -6
  2. metadata +2 -2
data/bin/rfcgi CHANGED
@@ -17,17 +17,26 @@ pram = nil
17
17
  is_production = nil
18
18
  use_errors = nil
19
19
  FCGI.each_cgi do |cgi|
20
- #puts cgi.header
21
- #cgi.env_table.each do |k,v|
22
- # puts "#{k}=#{v}<br>"
23
- #end
24
20
  is_production = ((cgi.env_table["INK_PRODUCTION"] and eval cgi.env_table["INK_PRODUCTION"]) or (ENV["INK_PRODUCTION"] and eval ENV["INK_PRODUCTION"])) ? true : false
25
21
  use_errors = ((cgi.env_table["INK_ERRORS"] and eval cgi.env_table["INK_ERRORS"]) or (ENV["INK_ERRORS"] and eval ENV["INK_ERRORS"])) ? true : false
26
22
  time = Time.now
27
23
  script = cgi.env_table['SCRIPT_FILENAME']
28
24
  begin
29
- pram = CGI::parse(cgi.env_table['QUERY_STRING'].gsub(/\?/, "&"))
30
- control = pram['controller'][0]
25
+ pram = Hash.new
26
+ CGI::parse(cgi.env_table['QUERY_STRING'].gsub(/\?/, "&")).each do |k,v|
27
+ if v.is_a? Array
28
+ if v.length == 0
29
+ pram[k] = nil
30
+ elsif v.length == 1
31
+ pram[k] = v[0]
32
+ else
33
+ pram[k] = v
34
+ end
35
+ else
36
+ pram[k] = v
37
+ end
38
+ end
39
+ control = pram['controller']
31
40
  routes = Ink::Beauty.load_routes script
32
41
  fhandle = SimpleMmap::MappedFile.new(routes)
33
42
  Dir.chdir( File.dirname(routes) )
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: webink
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.0
5
+ version: 1.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matthias Geier
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-09-14 00:00:00 Z
13
+ date: 2012-09-15 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fcgi