Skip to content

Commit 305d3f2

Browse files
committed
put option generation back in the create_connection method, update rubocop_todo
1 parent 741cf22 commit 305d3f2

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

.rubocop_todo.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2024-11-06 16:01:45 UTC using RuboCop version 1.26.1.
3+
# on 2025-02-03 19:01:09 UTC using RuboCop version 1.26.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -44,17 +44,17 @@ Lint/RedundantCopDisableDirective:
4444
Exclude:
4545
- 'lib/slack-ruby-client.rb'
4646

47-
# Offense count: 12
47+
# Offense count: 13
4848
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
4949
Metrics/AbcSize:
5050
Max: 36
5151

52-
# Offense count: 4
52+
# Offense count: 5
5353
# Configuration parameters: IgnoredMethods.
5454
Metrics/CyclomaticComplexity:
55-
Max: 10
55+
Max: 11
5656

57-
# Offense count: 13
57+
# Offense count: 14
5858
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
5959
Metrics/MethodLength:
6060
Max: 26
@@ -64,10 +64,10 @@ Metrics/MethodLength:
6464
Metrics/ParameterLists:
6565
Max: 6
6666

67-
# Offense count: 2
67+
# Offense count: 3
6868
# Configuration parameters: IgnoredMethods.
6969
Metrics/PerceivedComplexity:
70-
Max: 10
70+
Max: 11
7171

7272
# Offense count: 2
7373
# This cop supports safe auto-correction (--auto-correct).
@@ -94,12 +94,12 @@ RSpec/ContextMethod:
9494
RSpec/ContextWording:
9595
Enabled: false
9696

97-
# Offense count: 65
97+
# Offense count: 66
9898
# Configuration parameters: CountAsOne.
9999
RSpec/ExampleLength:
100100
Max: 18
101101

102-
# Offense count: 18
102+
# Offense count: 19
103103
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
104104
# Include: **/*_spec*rb*, **/spec/**/*
105105
RSpec/FilePath:

lib/slack/web/faraday/connection.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Slack
33
module Web
44
module Faraday
55
module Connection
6-
def default_options
6+
def create_connection(expect_json_response: true)
77
options = {
88
headers: { 'Accept' => 'application/json; charset=utf-8' }
99
}
@@ -15,11 +15,7 @@ def default_options
1515
request_options[:timeout] = timeout if timeout
1616
request_options[:open_timeout] = open_timeout if open_timeout
1717
options[:request] = request_options if request_options.any?
18-
options
19-
end
2018

21-
def create_connection(expect_json_response: true)
22-
options = default_options
2319
::Faraday::Connection.new(endpoint, options) do |connection|
2420
connection.request :multipart
2521
connection.request :url_encoded

0 commit comments

Comments
 (0)