chore: RuboCop lint Layout/SpaceInsideBlockBraces

This commit is contained in:
Olle Jonsson 2019-02-27 08:41:05 +01:00
parent ba6247eb35
commit 7ddccdbd1e
7 changed files with 7 additions and 7 deletions

View File

@ -102,7 +102,7 @@ module Faraday
failed_stubs = []
@stack.each do |method, stubs|
unless stubs.empty?
failed_stubs.concat(stubs.map {|stub|
failed_stubs.concat(stubs.map { |stub|
"Expected #{method} #{stub}."
})
end

View File

@ -20,7 +20,7 @@ module Faraday
ESCAPE_RE = /[^a-zA-Z0-9 .~_-]/
def escape(s)
s.to_s.gsub(ESCAPE_RE) {|match|
s.to_s.gsub(ESCAPE_RE) { |match|
'%' + match.unpack('H2' * match.bytesize).join('%').upcase
}.tr(' ', '+')
end

View File

@ -28,7 +28,7 @@ end
def write(file, contents, env_var)
FileUtils.mkdir_p(File.dirname(file))
File.open(file, 'w') {|f| f.puts(contents) }
File.open(file, 'w') { |f| f.puts(contents) }
puts %(export #{env_var}="#{file}") if $shell
end

View File

@ -69,7 +69,7 @@ RSpec.describe Faraday::CompositeReadIO do
context 'with utf8 multibyte part' do
subject { composite_io(part("\x86"), part('ファイル')) }
it { expect(subject.read).to eq(String.new("\x86\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB", encoding: 'BINARY'))}
it { expect(subject.read).to eq(String.new("\x86\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB", encoding: 'BINARY')) }
it 'allows to read in chunks' do
expect(subject.read(3)).to eq(String.new("\x86\xE3\x83", encoding: 'BINARY'))
expect(subject.read(3)).to eq(String.new("\x95\xE3\x82", encoding: 'BINARY'))

View File

@ -40,7 +40,7 @@ RSpec.describe Faraday::Utils do
end
it 'parses with block' do
with_default_uri_parser(lambda {|u| "booya#{"!" * u.size}" }) do
with_default_uri_parser(lambda { |u| "booya#{"!" * u.size}" }) do
expect(normalize(url)).to eq('booya!!!!!!!!!!!!!!!!!!!!!!')
end
end

View File

@ -93,7 +93,7 @@ module Faraday
def big_string
kb = 1024
(32..126).map {|i| i.chr}.cycle.take(50 * kb).join
(32..126).map { |i| i.chr }.cycle.take(50 * kb).join
end
end
end

View File

@ -4,7 +4,7 @@ module Faraday
module Shared
def self.big_string
kb = 1024
(32..126).map {|i| i.chr}.cycle.take(50 * kb).join
(32..126).map { |i| i.chr }.cycle.take(50 * kb).join
end
def big_string