Skip to content

Fix ruby 4 header regression#117

Merged
danielwestendorf merged 3 commits into
mainfrom
fix-ruby-4-header-regression
Jun 23, 2026
Merged

Fix ruby 4 header regression#117
danielwestendorf merged 3 commits into
mainfrom
fix-ruby-4-header-regression

Conversation

@danielwestendorf

Copy link
Copy Markdown
Owner

No description provided.

{
Authorization: "Bearer #{BreezyPDFLite.secret_api_key}"
"Authorization" => "Bearer #{BreezyPDFLite.secret_api_key}",
"Content-Type" => "application/x-www-form-urlencoded"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

def headers
{
Authorization: "Bearer #{BreezyPDFLite.secret_api_key}"
"Authorization" => "Bearer #{BreezyPDFLite.secret_api_key}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb
tested_class.new.post("/foo", "bob")

request.exec(socket, "1.1", request.path)
assert_match(/\r\nContent-Type: application\/x-www-form-urlencoded\r\n/i, written)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/RegexpLiteral: Use %r around regular expression.
Metrics/LineLength: Line is too long. [86/80]

Comment thread test/client_test.rb
Net::HTTP.expects(:new).returns(http_mock)
tested_class.new.post("/foo", "bob")

request.exec(socket, "1.1", request.path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb
http_mock.expects(:request).with { |net_http_request| request = net_http_request }

Net::HTTP.expects(:new).returns(http_mock)
tested_class.new.post("/foo", "bob")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb
strings.sum(&:bytesize)
end

http_mock = mock("HTTP")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb

def test_post_sends_form_content_type
request = nil
written = +""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb
tested_class.new.post(path, body)
end

def test_post_sends_form_content_type

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/AbcSize: Assignment Branch Condition size for test_post_sends_form_content_type is too high. [26.48/15]
Metrics/MethodLength: Method has too many lines. [17/10]

Comment thread test/client_test.rb
headers = {
Authorization: "Bearer #{BreezyPDFLite.secret_api_key}"
"Authorization" => "Bearer #{BreezyPDFLite.secret_api_key}",
"Content-Type" => "application/x-www-form-urlencoded"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Comment thread test/client_test.rb
uri = URI.parse(BreezyPDFLite.base_url + path)
headers = {
Authorization: "Bearer #{BreezyPDFLite.secret_api_key}"
"Authorization" => "Bearer #{BreezyPDFLite.secret_api_key}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@danielwestendorf danielwestendorf merged commit 6a227cc into main Jun 23, 2026
4 checks passed
@danielwestendorf danielwestendorf deleted the fix-ruby-4-header-regression branch June 23, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants