Skip to content

Commit

Permalink
Add # frozen_string_literal: true to all files (closes #9).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jan 25, 2024
1 parent 7640c6b commit 9f7cdd2
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/uri/query_params.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

require_relative 'query_params/query_params'
require_relative 'query_params/core_ext'
2 changes: 2 additions & 0 deletions lib/uri/query_params/core_ext.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

require_relative 'core_ext/uri'
require_relative 'core_ext/addressable/uri' if defined?(Addressable)
2 changes: 2 additions & 0 deletions lib/uri/query_params/core_ext/addressable/uri.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'uri/query_params/mixin'

require 'addressable/uri'
Expand Down
2 changes: 2 additions & 0 deletions lib/uri/query_params/core_ext/uri.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

require_relative 'uri/generic'
require_relative 'uri/http'
2 changes: 2 additions & 0 deletions lib/uri/query_params/extensions.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require_relative 'core_ext'
2 changes: 2 additions & 0 deletions lib/uri/query_params/extensions/addressable/uri.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require_relative '../../core_ext/addressable/uri'
2 changes: 2 additions & 0 deletions lib/uri/query_params/extensions/uri.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require_relative '../core_ext/uri'
2 changes: 2 additions & 0 deletions lib/uri/query_params/extensions/uri/generic.rb
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require_relative '../../core_ext/uri/generic'
2 changes: 2 additions & 0 deletions lib/uri/query_params/mixin.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative 'query_params'

module URI
Expand Down
6 changes: 4 additions & 2 deletions lib/uri/query_params/query_params.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'uri/common'

module URI
Expand Down Expand Up @@ -78,8 +80,8 @@ def self.parse(query_string)
def self.escape(value)
case value
when Array then URI::DEFAULT_PARSER.escape(value.join(' '),UNSAFE)
when true then 'active'
when false, nil then ''
when true then String.new('active')
when false, nil then String.new('')
else URI::DEFAULT_PARSER.escape(value.to_s,UNSAFE)
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/uri/query_params/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module URI
module QueryParams
# uri-query_params version
Expand Down

0 comments on commit 9f7cdd2

Please sign in to comment.