lib/yard/server/doc_server_serializer.rb in yard-0.8.7.6 vs lib/yard/server/doc_server_serializer.rb in yard-0.9.0
- old
+ new
@@ -1,14 +1,12 @@
-require 'webrick/httputils'
+require 'cgi'
module YARD
module Server
# A custom {Serializers::Base serializer} which returns resource URLs instead of
# static relative paths to files on disk.
class DocServerSerializer < Serializers::FileSystemSerializer
- include WEBrick::HTTPUtils
-
def initialize(command = nil)
super(:basepath => '', :extension => '')
end
def serialized_path(object)
@@ -34,10 +32,10 @@
def urlencode(name)
if name.respond_to?(:force_encoding)
name = name.dup.force_encoding('binary')
end
- escape(name)
+ CGI.escape(name)
end
end
end
end