Skip to content

Commit

Permalink
Appease standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
koppen committed Dec 6, 2024
1 parent 67c32ee commit 1c99b41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/route_downcaser/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/route_downcaser/downcase_route_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/route_downcaser_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# desc "Explaining what the task does"
# task :route_downcaser do
# # Task goes here
Expand Down

0 comments on commit 1c99b41

Please sign in to comment.