lilypad 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/gemspec.rb +1 -1
  2. data/lib/rack/lilypad.rb +6 -2
  3. metadata +1 -1
data/gemspec.rb CHANGED
@@ -13,5 +13,5 @@ GEM_SPEC = Gem::Specification.new do |s|
13
13
  s.name = GEM_NAME
14
14
  s.platform = Gem::Platform::RUBY
15
15
  s.require_path = "lib"
16
- s.version = "0.1.4"
16
+ s.version = "0.1.5"
17
17
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lilypad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh