@@ -119,37 +119,37 @@ def faraday_ssl(options)
119
119
return options [ :ssl ] if options [ :ssl ]
120
120
121
121
ssl = options [ :options ]
122
- if ssl [ :verify_ssl ] || ssl [ :ssl_cert_store ]
123
- {
124
- verify : ssl [ :verify_ssl ] != OpenSSL :: SSL :: VERIFY_NONE ,
125
- cert_store : ssl [ :ssl_cert_store ] ,
126
- }
127
- end
122
+ return unless ssl [ :verify_ssl ] || ssl [ :ssl_cert_store ]
123
+
124
+ {
125
+ verify : ssl [ :verify_ssl ] != OpenSSL :: SSL :: VERIFY_NONE ,
126
+ cert_store : ssl [ :ssl_cert_store ] ,
127
+ }
128
128
end
129
129
130
130
# Helper function to evalueate the low level headers option
131
131
def faraday_headers ( options )
132
132
return options [ :headers ] if options [ :headers ]
133
133
134
134
headers = options [ :credentials ]
135
- if headers [ :token ]
136
- {
137
- Authorization : 'Bearer ' + headers [ :token ] . to_s ,
138
- }
139
- end
135
+ return unless headers && headers [ :token ]
136
+
137
+ {
138
+ Authorization : 'Bearer ' + headers [ :token ] . to_s ,
139
+ }
140
140
end
141
141
142
142
# Helper function to evalueate the low level headers option
143
143
def faraday_request ( options )
144
144
return options [ :request ] if options [ :request ]
145
145
146
146
request = options [ :options ]
147
- if request [ :open_timeout ] || request [ :timeout ]
148
- {
149
- open_timeout : request [ :open_timeout ] ,
150
- timeout : request [ :timeout ] ,
151
- }
152
- end
147
+ return unless request [ :open_timeout ] || request [ :timeout ]
148
+
149
+ {
150
+ open_timeout : request [ :open_timeout ] ,
151
+ timeout : request [ :timeout ] ,
152
+ }
153
153
end
154
154
155
155
# Helper function to create the args for the low level client
0 commit comments