mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
Mitigates Style/SpaceBeforeBlockBraces
This commit is contained in:
parent
1b53677385
commit
b0db829b36
3 changed files with 7 additions and 7 deletions
|
@ -23,6 +23,6 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.files = `git ls-files`.split("\n")
|
||||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
||||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
||||
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
||||
s.require_paths = ["lib"]
|
||||
end
|
||||
|
|
|
@ -318,7 +318,7 @@ RSpec.describe HTTParty do
|
|||
end
|
||||
|
||||
let(:parser) do
|
||||
Proc.new{ |data, format| CustomParser.parse(data) }
|
||||
Proc.new { |data, format| CustomParser.parse(data) }
|
||||
end
|
||||
|
||||
it "should set parser options" do
|
||||
|
|
|
@ -29,16 +29,16 @@ class SSLTestServer
|
|||
|
||||
@ssl_server = OpenSSL::SSL::SSLServer.new(@raw_server, @ctx)
|
||||
|
||||
@stopping_mutex.synchronize{
|
||||
@stopping_mutex.synchronize {
|
||||
return if @stopping
|
||||
@thread = Thread.new{ thread_main }
|
||||
@thread = Thread.new { thread_main }
|
||||
}
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
def stop
|
||||
@stopping_mutex.synchronize{
|
||||
@stopping_mutex.synchronize {
|
||||
return if @stopping
|
||||
@stopping = true
|
||||
}
|
||||
|
@ -48,14 +48,14 @@ class SSLTestServer
|
|||
private
|
||||
|
||||
def thread_main
|
||||
until @stopping_mutex.synchronize{ @stopping }
|
||||
until @stopping_mutex.synchronize { @stopping }
|
||||
(rr,_,_) = select([@ssl_server.to_io], nil, nil, 0.1)
|
||||
|
||||
next unless rr && rr.include?(@ssl_server.to_io)
|
||||
|
||||
socket = @ssl_server.accept
|
||||
|
||||
Thread.new{
|
||||
Thread.new {
|
||||
header = []
|
||||
|
||||
until (line = socket.readline).rstrip.empty?
|
||||
|
|
Loading…
Add table
Reference in a new issue