Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RuboCop disables for Style/ArgumentsForwarding #1550

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions lib/faraday/adapter/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,32 @@ def match(env)
matches?(consumed, env)
end

def get(path, headers = {}, &block)
new_stub(:get, path, headers, &block)
def get(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:get, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding
end

def head(path, headers = {}, &block)
new_stub(:head, path, headers, &block)
def head(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:head, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding
end

def post(path, body = nil, headers = {}, &block)
new_stub(:post, path, headers, body, &block)
def post(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:post, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding
end

def put(path, body = nil, headers = {}, &block)
new_stub(:put, path, headers, body, &block)
def put(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:put, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding
end

def patch(path, body = nil, headers = {}, &block)
new_stub(:patch, path, headers, body, &block)
def patch(path, body = nil, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:patch, path, headers, body, &block) # rubocop:disable Style/ArgumentsForwarding
end

def delete(path, headers = {}, &block)
new_stub(:delete, path, headers, &block)
def delete(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:delete, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding
end

def options(path, headers = {}, &block)
new_stub(:options, path, headers, &block)
def options(path, headers = {}, &block) # rubocop:disable Style/ArgumentsForwarding
new_stub(:options, path, headers, &block) # rubocop:disable Style/ArgumentsForwarding
end

# Raises an error if any of the stubbed calls have not been made.
Expand Down
4 changes: 2 additions & 2 deletions lib/faraday/middleware_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def lookup_middleware(key)

private

def middleware_mutex(&block)
def middleware_mutex(&block) # rubocop:disable Style/ArgumentsForwarding
@middleware_mutex ||= Monitor.new
@middleware_mutex.synchronize(&block)
@middleware_mutex.synchronize(&block) # rubocop:disable Style/ArgumentsForwarding
end

def load_middleware(key)
Expand Down