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.files = `git ls-files`.split("\n")
|
||||||
s.test_files = `git ls-files -- {test,spec,features}/*`.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"]
|
s.require_paths = ["lib"]
|
||||||
end
|
end
|
||||||
|
|
|
@ -318,7 +318,7 @@ RSpec.describe HTTParty do
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:parser) do
|
let(:parser) do
|
||||||
Proc.new{ |data, format| CustomParser.parse(data) }
|
Proc.new { |data, format| CustomParser.parse(data) }
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should set parser options" do
|
it "should set parser options" do
|
||||||
|
|
|
@ -29,16 +29,16 @@ class SSLTestServer
|
||||||
|
|
||||||
@ssl_server = OpenSSL::SSL::SSLServer.new(@raw_server, @ctx)
|
@ssl_server = OpenSSL::SSL::SSLServer.new(@raw_server, @ctx)
|
||||||
|
|
||||||
@stopping_mutex.synchronize{
|
@stopping_mutex.synchronize {
|
||||||
return if @stopping
|
return if @stopping
|
||||||
@thread = Thread.new{ thread_main }
|
@thread = Thread.new { thread_main }
|
||||||
}
|
}
|
||||||
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def stop
|
def stop
|
||||||
@stopping_mutex.synchronize{
|
@stopping_mutex.synchronize {
|
||||||
return if @stopping
|
return if @stopping
|
||||||
@stopping = true
|
@stopping = true
|
||||||
}
|
}
|
||||||
|
@ -48,14 +48,14 @@ class SSLTestServer
|
||||||
private
|
private
|
||||||
|
|
||||||
def thread_main
|
def thread_main
|
||||||
until @stopping_mutex.synchronize{ @stopping }
|
until @stopping_mutex.synchronize { @stopping }
|
||||||
(rr,_,_) = select([@ssl_server.to_io], nil, nil, 0.1)
|
(rr,_,_) = select([@ssl_server.to_io], nil, nil, 0.1)
|
||||||
|
|
||||||
next unless rr && rr.include?(@ssl_server.to_io)
|
next unless rr && rr.include?(@ssl_server.to_io)
|
||||||
|
|
||||||
socket = @ssl_server.accept
|
socket = @ssl_server.accept
|
||||||
|
|
||||||
Thread.new{
|
Thread.new {
|
||||||
header = []
|
header = []
|
||||||
|
|
||||||
until (line = socket.readline).rstrip.empty?
|
until (line = socket.readline).rstrip.empty?
|
||||||
|
|
Loading…
Add table
Reference in a new issue