diff --git a/lib/route_downcaser/configuration.rb b/lib/route_downcaser/configuration.rb index 2b1eef5..e056d4a 100644 --- a/lib/route_downcaser/configuration.rb +++ b/lib/route_downcaser/configuration.rb @@ -7,14 +7,14 @@ def configuration end def define_setting(name, default = nil) - class_variable_set("@@#{name}", default) + class_variable_set(:"@@#{name}", default) define_class_method "#{name}=" do |value| - class_variable_set("@@#{name}", value) + class_variable_set(:"@@#{name}", value) end define_class_method name do - class_variable_get("@@#{name}") + class_variable_get(:"@@#{name}") end end diff --git a/lib/route_downcaser/downcase_route_middleware.rb b/lib/route_downcaser/downcase_route_middleware.rb index f28daa7..7037128 100644 --- a/lib/route_downcaser/downcase_route_middleware.rb +++ b/lib/route_downcaser/downcase_route_middleware.rb @@ -20,7 +20,7 @@ def _call(env) # Downcase path_info if applicable path_info = downcased_uri(path_info) - path_info = path_info.gsub('%7E', '~') if path_info + path_info = path_info.gsub("%7E", "~") if path_info # If redirect configured, then return redirect request, if either # path_info has changed diff --git a/lib/tasks/route_downcaser_tasks.rake b/lib/tasks/route_downcaser_tasks.rake index 165cee6..b5144c0 100644 --- a/lib/tasks/route_downcaser_tasks.rake +++ b/lib/tasks/route_downcaser_tasks.rake @@ -1,4 +1,5 @@ # frozen_string_literal: true + # desc "Explaining what the task does" # task :route_downcaser do # # Task goes here