Merge pull request #87 from pieterocp/misc-typoes

[Misc] Nitpick typoes
This commit is contained in:
Sami Samhuri 2025-06-27 15:19:19 -04:00 committed by GitHub
commit 16062114b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ module GrapeLogging
# In some cases, response.body is not parseable by JSON.
# For example, if you POST on a PUT endpoint, response.body is egal to """".
# It's strange but it's the Grape behavior...
# It's strange, but it's the Grape behavior...
def serialized_response_body(response)
if response.respond_to?(:body)

View file

@ -37,7 +37,7 @@ module GrapeLogging
@response_status = status
@response_body = response
# Perform repotters
# Perform reporters
@reporter.perform(collect_parameters)
# Invoke loggers
@ -69,7 +69,7 @@ module GrapeLogging
end
# Get status & response from app_response
# when no error occures.
# when no error occurs.
if error
# Call with error & response
after(error[:status], error[:message])

View file

@ -6,7 +6,7 @@ describe GrapeLogging::Loggers::RequestHeaders do
OpenStruct.new(env: {HTTP_REFERER: 'http://example.com', HTTP_ACCEPT: 'text/plain'})
end
let(:mock_request_with_unhandle_headers) do
let(:mock_request_with_unhandled_headers) do
OpenStruct.new(env: {
HTTP_REFERER: 'http://example.com',
"PATH_INFO"=>"/api/v1/users"
@ -27,7 +27,7 @@ describe GrapeLogging::Loggers::RequestHeaders do
end
it 'only handle things which start with HTTP_' do
expect(subject.parameters(mock_request_with_unhandle_headers, nil)).to eq({
expect(subject.parameters(mock_request_with_unhandled_headers, nil)).to eq({
headers: {'Referer' => 'http://example.com' }
})
end

View file

@ -27,7 +27,7 @@ describe GrapeLogging::Middleware::RequestLogger do
end
[301, 404, 500].each do |the_status|
context "when the respnse status is #{the_status}" do
context "when the response status is #{the_status}" do
let(:status) { the_status }
it 'should log the correct status code' do
expect(logger).to receive('info') do |arguments|