lib/roda/plugins/public.rb in roda-2.23.0 vs lib/roda/plugins/public.rb in roda-2.24.0

- old
+ new

@@ -30,10 +30,10 @@ # :gzip :: Whether to serve already gzipped files with a .gz extension for clients # supporting gzipped transfer encoding. # :headers :: A hash of headers to use for statically served files # :root :: Use this option for the root of the public directory (default: "public") def self.configure(app, opts={}) - root = File.expand_path(opts[:root]||"public", app.opts[:root]) + root = app.expand_path(opts[:root]||"public") app.opts[:public_server] = ::Rack::File.new(root, opts[:headers]||{}, opts[:default_mime] || 'text/plain') app.opts[:public_gzip] = opts[:gzip] end module RequestMethods