Skip to content

Commit

Permalink
Merge pull request #67 from substancelab/lint
Browse files Browse the repository at this point in the history
Appease standardrb
  • Loading branch information
koppen authored Dec 6, 2024
2 parents 67c32ee + 9263389 commit 22ca9c9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
exclude:
- rails-version: '5.2.8.1'
ruby-version: '3.3'
- rails-version: 'main'
ruby-version: '2.7'
- rails-version: 'main'
ruby-version: '3.0'
- rails-version: 'main'
ruby-version: '3.1'

env:
RAILS_VERSION: ${{ matrix.rails-version }}
Expand Down
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 22ca9c9

Please sign in to comment.