lib/roda/plugins/public.rb in roda-3.84.0 vs lib/roda/plugins/public.rb in roda-3.85.0
- old
+ new
@@ -40,15 +40,15 @@
# r.public
# end
# end
module Public
SPLIT = Regexp.union(*[File::SEPARATOR, File::ALT_SEPARATOR].compact)
- PARSER = URI::DEFAULT_PARSER
RACK_FILES = defined?(Rack::Files) ? Rack::Files : Rack::File
ENCODING_MAP = {:zstd=>'zstd', :brotli=>'br', :gzip=>'gzip'}.freeze
ENCODING_EXTENSIONS = {'br'=>'.br', 'gzip'=>'.gz', 'zstd'=>'.zst'}.freeze
# :nocov:
+ PARSER = defined?(::URI::RFC2396_PARSER) ? ::URI::RFC2396_PARSER : ::URI::DEFAULT_PARSER
MATCH_METHOD = RUBY_VERSION >= '2.4' ? :match? : :match
# :nocov:
# Use options given to setup a Rack::File instance for serving files. Options:
# :brotli :: Whether to serve already brotli-compressed files with a .br extension