lib/roda/plugins/path_rewriter.rb in roda-2.28.0 vs lib/roda/plugins/path_rewriter.rb in roda-2.29.0

- old
+ new

@@ -44,11 +44,11 @@ # All path rewrites are applied in order, so if a path is rewritten by one rewrite, # it can be rewritten again by a later rewrite. Note that PATH_INFO rewrites are # processed before remaining_path rewrites. module PathRewriter OPTS={}.freeze - + RodaPlugins.deprecate_constant(self, :OPTS) PATH_INFO = 'PATH_INFO'.freeze RodaPlugins.deprecate_constant(self, :PATH_INFO) def self.configure(app) app.instance_exec do @@ -65,10 +65,10 @@ super end # Record a path rewrite from path +was+ to path +is+. Options: # :path_info :: Modify PATH_INFO, not just remaining path. - def rewrite_path(was, is = nil, opts=OPTS, &block) + def rewrite_path(was, is = nil, opts=RodaPlugins::OPTS, &block) if is.is_a? Hash raise RodaError, "cannot provide two hashes to rewrite_path" unless opts.empty? opts = is is = nil end