Skip to content

Commit bfa79ff

Browse files
committed
RuboCop.
1 parent c4189aa commit bfa79ff

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

lib/protocol/http/header/accept.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Accept < Array
3030

3131
# A single entry in the Accept: header, which includes a mime type and associated parameters.
3232
MediaRange = Struct.new(:type, :subtype, :parameters) do
33-
def initialize(type, subtype = '*', parameters = {})
33+
def initialize(type, subtype = "*", parameters = {})
3434
super(type, subtype, parameters)
3535
end
3636

@@ -39,7 +39,7 @@ def <=> other
3939
end
4040

4141
def parameters_string
42-
return '' if parameters == nil or parameters.empty?
42+
return "" if parameters == nil or parameters.empty?
4343

4444
parameters.collect do |key, value|
4545
"; #{key.to_s}=#{QuotedString.quote(value.to_s)}"
@@ -65,7 +65,7 @@ def to_s
6565
alias to_str to_s
6666

6767
def quality_factor
68-
parameters.fetch('q', 1.0).to_f
68+
parameters.fetch("q", 1.0).to_f
6969
end
7070

7171
def split(*args)

lib/protocol/http/header/quoted_string.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def self.unquote(value, normalize_whitespace = true)
2424

2525
if normalize_whitespace
2626
# LWS = [CRLF] 1*( SP | HT )
27-
value.gsub!(/[\r\n]+\s+/, ' ')
27+
value.gsub!(/[\r\n]+\s+/, " ")
2828
end
2929

3030
return value

test/protocol/http/header/accept.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Released under the MIT License.
44
# Copyright, 2025, by Samuel Williams.
55

6-
require 'protocol/http/header/accept'
6+
require "protocol/http/header/accept"
77

88
describe Protocol::HTTP::Header::Accept::MediaRange do
99
it "should have default quality_factor of 1.0" do
10-
language = subject.new('text/plain', nil)
10+
language = subject.new("text/plain", nil)
1111
expect(language.quality_factor).to be == 1.0
1212
end
1313
end

test/protocol/http/header/accept_charset.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Released under the MIT License.
44
# Copyright, 2025, by Samuel Williams.
55

6-
require 'protocol/http/header/accept_charset'
6+
require "protocol/http/header/accept_charset"
77

88
describe Protocol::HTTP::Header::AcceptCharset::Charset do
99
it "should have default quality_factor of 1.0" do
10-
charset = subject.new('utf-8', nil)
10+
charset = subject.new("utf-8", nil)
1111
expect(charset.quality_factor).to be == 1.0
1212
end
1313
end

test/protocol/http/header/accept_encoding.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Released under the MIT License.
44
# Copyright, 2025, by Samuel Williams.
55

6-
require 'protocol/http/header/accept_encoding'
6+
require "protocol/http/header/accept_encoding"
77

88
describe Protocol::HTTP::Header::AcceptEncoding::Encoding do
99
it "should have default quality_factor of 1.0" do
10-
encoding = subject.new('utf-8', nil)
10+
encoding = subject.new("utf-8", nil)
1111
expect(encoding.quality_factor).to be == 1.0
1212
end
1313
end

test/protocol/http/header/accept_language.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Released under the MIT License.
44
# Copyright, 2025, by Samuel Williams.
55

6-
require 'protocol/http/header/accept_language'
6+
require "protocol/http/header/accept_language"
77

88
describe Protocol::HTTP::Header::AcceptLanguage::Language do
99
it "should have default quality_factor of 1.0" do
10-
language = subject.new('utf-8', nil)
10+
language = subject.new("utf-8", nil)
1111
expect(language.quality_factor).to be == 1.0
1212
end
1313
end

0 commit comments

Comments
 (0)