lilypad 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/gemspec.rb +1 -1
- data/lib/rack/lilypad.rb +6 -2
- metadata +1 -1
data/gemspec.rb
CHANGED
data/lib/rack/lilypad.rb
CHANGED
@@ -52,6 +52,10 @@ module Rack
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def to_string(obj)
|
56
|
+
obj.respond_to?(:trim) ? obj : obj.inspect
|
57
|
+
end
|
58
|
+
|
55
59
|
def log(msg)
|
56
60
|
::File.open(@log, 'a') { |f| f.write(msg) } if @log
|
57
61
|
end
|
@@ -113,14 +117,14 @@ module Rack
|
|
113
117
|
if request.params.any?
|
114
118
|
r.params do |p|
|
115
119
|
request.params.each do |key, value|
|
116
|
-
p.var(value, :key => key)
|
120
|
+
p.var(to_string(value), :key => key)
|
117
121
|
end
|
118
122
|
end
|
119
123
|
end
|
120
124
|
if environment.any?
|
121
125
|
r.tag!('cgi-data') do |c|
|
122
126
|
environment.each do |key, value|
|
123
|
-
c.var(value, :key => key)
|
127
|
+
c.var(to_string(value), :key => key)
|
124
128
|
end
|
125
129
|
end
|
126
130
|
end
|