mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-05 00:05:35 -04:00
Merge branch 'master' into fix/rubocop-linting-more
This commit is contained in:
commit
64d9002b75
@ -738,15 +738,6 @@ Style/UnlessElse:
|
||||
- 'lib/faraday/adapter/em_http.rb'
|
||||
- 'lib/faraday/adapter/em_http_ssl_patch.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
||||
# SupportedStyles: percent, brackets
|
||||
Style/WordArray:
|
||||
Exclude:
|
||||
- 'script/generate_certs'
|
||||
- 'spec/faraday/request/url_encoded_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
@ -757,7 +748,7 @@ Style/YodaCondition:
|
||||
- 'script/proxy-server'
|
||||
- 'test/helper.rb'
|
||||
|
||||
# Offense count: 273
|
||||
# Offense count: 272
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
|
@ -33,7 +33,7 @@ def write(file, contents, env_var)
|
||||
end
|
||||
|
||||
# One cert / CA for ease of testing when ignoring verification
|
||||
cert, key = create_self_signed_cert(1024, [['CN', 'localhost']], 'Faraday Test CA')
|
||||
cert, key = create_self_signed_cert(1024, [%w[CN localhost]], 'Faraday Test CA')
|
||||
write 'tmp/faraday-cert.key', key, 'SSL_KEY'
|
||||
write 'tmp/faraday-cert.crt', cert, 'SSL_FILE'
|
||||
|
||||
|
@ -46,11 +46,11 @@ RSpec.describe Faraday::Request::UrlEncoded do
|
||||
end
|
||||
|
||||
it 'works with non nested params' do
|
||||
response = conn.post('/echo', { dimensions: ['date', 'location'] }) do |req|
|
||||
response = conn.post('/echo', { dimensions: %w[date location] }) do |req|
|
||||
req.options.params_encoder = Faraday::FlatParamsEncoder
|
||||
end
|
||||
expect(response.headers['Content-Type']).to eq('application/x-www-form-urlencoded')
|
||||
expected = { 'dimensions' => ['date', 'location'] }
|
||||
expected = { 'dimensions' => %w[date location] }
|
||||
expect(Faraday::Utils.parse_query(response.body)).to eq(expected)
|
||||
expect(response.body).to eq('dimensions=date&dimensions=location')
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user