unicorn 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a53c6f0287f74563b46ac07e96cbb709562e4f26bdbf46ae1cb904a3e345828
4
- data.tar.gz: 0724bceedd3b964168081c4a12c8f9eb04611013f6ef72593d6db63bd31cccf1
3
+ metadata.gz: 5e12c8bfe14a84877de48727dd053f35d815c68e35e62aa9db57fb1bdc520d22
4
+ data.tar.gz: 9e74449cbf6adf07b27f6745829e794a11c29537917c6a8e7cd31fd59669625f
5
5
  SHA512:
6
- metadata.gz: a0b91ca7dd6cc2e52f7eed8fdd30547dbcd3c81939c1df495e612ff94a544dc589cd3d3cd9e4c17206f135ac7e3ef763ecfa80bebacce42960df7f93a679d091
7
- data.tar.gz: 9eba1d1fefa858d93524ff73c77b8a239b9e50abb6f8bac840d436afebd27608dcad6a8d7f49c35dd44f2577563fdbdc898541efa312b7f5953c155cf1eaf057
6
+ metadata.gz: 643c4edec67b12b5fd6d0708e26b169e68ead4332d862b84aa3fc0319fec2f2e3d6a1822ee8b74d7570b5ce42cda9705aba5ac18a1ab1987a018f270d86b8994
7
+ data.tar.gz: bbc7ab165c6d9a4a8bd2e23a3740029c8653d09a0573bec41d4cfbdcbfcfce27de88859d608c06e0aabb76ffcb015924b54b276b731875554f593a399810bd58
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- DEF_VER = "v5.4.0"
2
+ DEF_VER = "v5.4.1"
3
3
  CONSTANT = "Unicorn::Const::UNICORN_VERSION"
4
4
  RVF = "lib/unicorn/version.rb"
5
5
  GVF = "GIT-VERSION-FILE"
@@ -553,9 +553,9 @@ def spawn_missing_workers
553
553
  @workers[pid] = worker
554
554
  worker.atfork_parent
555
555
  end
556
- rescue => e
557
- @logger.error(e) rescue nil
558
- exit!
556
+ rescue => e
557
+ @logger.error(e) rescue nil
558
+ exit!
559
559
  end
560
560
 
561
561
  def maintain_worker_count
@@ -586,7 +586,7 @@ def handle_error(client, e)
586
586
  client.kgio_trywrite(err_response(code, @request.response_start_sent))
587
587
  end
588
588
  client.close
589
- rescue
589
+ rescue
590
590
  end
591
591
 
592
592
  def e100_response_write(client, env)
@@ -669,9 +669,9 @@ def reopen_worker_logs(worker_nr)
669
669
  logger.info "worker=#{worker_nr} reopening logs..."
670
670
  Unicorn::Util.reopen_logs
671
671
  logger.info "worker=#{worker_nr} done reopening logs"
672
- rescue => e
673
- logger.error(e) rescue nil
674
- exit!(77) # EX_NOPERM in sysexits.h
672
+ rescue => e
673
+ logger.error(e) rescue nil
674
+ exit!(77) # EX_NOPERM in sysexits.h
675
675
  end
676
676
 
677
677
  # runs inside each forked worker, this sits around and waits
@@ -757,11 +757,11 @@ def valid_pid?(path)
757
757
  wpid <= 0 and return
758
758
  Process.kill(0, wpid)
759
759
  wpid
760
- rescue Errno::EPERM
761
- logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}"
762
- nil
763
- rescue Errno::ESRCH, Errno::ENOENT
764
- # don't unlink stale pid files, racy without non-portable locking...
760
+ rescue Errno::EPERM
761
+ logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}"
762
+ nil
763
+ rescue Errno::ESRCH, Errno::ENOENT
764
+ # don't unlink stale pid files, racy without non-portable locking...
765
765
  end
766
766
 
767
767
  def load_config!
@@ -100,8 +100,8 @@ def set_server_sockopt(sock, opt)
100
100
  log_buffer_sizes(sock, " after: ")
101
101
  end
102
102
  sock.listen(opt[:backlog])
103
- rescue => e
104
- Unicorn.log_error(logger, "#{sock_name(sock)} #{opt.inspect}", e)
103
+ rescue => e
104
+ Unicorn.log_error(logger, "#{sock_name(sock)} #{opt.inspect}", e)
105
105
  end
106
106
 
107
107
  def log_buffer_sizes(sock, pfx = '')
@@ -11,8 +11,8 @@ def self.is_log?(fp)
11
11
  fp.stat.file? &&
12
12
  fp.sync &&
13
13
  (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
14
- rescue IOError, Errno::EBADF
15
- false
14
+ rescue IOError, Errno::EBADF
15
+ false
16
16
  end
17
17
 
18
18
  def self.chown_logs(uid, gid)
@@ -193,8 +193,8 @@ def test_working_directory_rel_path_config_file
193
193
  assert_equal other.path, results.first
194
194
 
195
195
  Process.kill(:QUIT, pid)
196
- ensure
197
- FileUtils.rmtree(other.path)
196
+ ensure
197
+ FileUtils.rmtree(other.path)
198
198
  end
199
199
 
200
200
  def test_working_directory
@@ -229,8 +229,8 @@ def test_working_directory
229
229
  assert_equal other.path, results.first
230
230
 
231
231
  Process.kill(:QUIT, pid)
232
- ensure
233
- FileUtils.rmtree(other.path)
232
+ ensure
233
+ FileUtils.rmtree(other.path)
234
234
  end
235
235
 
236
236
  def test_working_directory_controls_relative_paths
@@ -271,11 +271,10 @@ def test_working_directory_controls_relative_paths
271
271
  wait_master_ready("#{other.path}/stderr_log_here")
272
272
 
273
273
  Process.kill(:QUIT, pid)
274
- ensure
275
- FileUtils.rmtree(other.path)
274
+ ensure
275
+ FileUtils.rmtree(other.path)
276
276
  end
277
277
 
278
-
279
278
  def test_exit_signals
280
279
  %w(INT TERM QUIT).each do |sig|
281
280
  File.open("config.ru", "wb") { |fp| fp.syswrite(HI) }
@@ -44,7 +44,7 @@ def test_ccc_tcpi
44
44
  # make sure the server is running, at least
45
45
  client = TCPSocket.new(host, port)
46
46
  client.write("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")
47
- assert client.wait_readable(10), 'never got response from server'
47
+ assert client.wait(10), 'never got response from server'
48
48
  res = client.read
49
49
  assert_match %r{\AHTTP/1\.1 200}, res, 'got part of first response'
50
50
  assert_match %r{\r\n\r\n\z}, res, 'got end of response, server is ready'
@@ -17,9 +17,9 @@ def call(env)
17
17
  while env['rack.input'].read(4096)
18
18
  end
19
19
  [200, { 'Content-Type' => 'text/plain' }, ['hello!\n']]
20
- rescue Unicorn::ClientShutdown, Unicorn::HttpParserError => e
21
- $stderr.syswrite("#{e.class}: #{e.message} #{e.backtrace.empty?}\n")
22
- raise e
20
+ rescue Unicorn::ClientShutdown, Unicorn::HttpParserError => e
21
+ $stderr.syswrite("#{e.class}: #{e.message} #{e.backtrace.empty?}\n")
22
+ raise e
23
23
  end
24
24
  end
25
25
 
@@ -80,8 +80,8 @@ def test_preload_app_config
80
80
  loader_pid = tmp.sysread(4096).to_i
81
81
  assert_equal $$, loader_pid
82
82
  assert worker_pid != loader_pid
83
- ensure
84
- tmp.close!
83
+ ensure
84
+ tmp.close!
85
85
  end
86
86
 
87
87
  def test_broken_app
@@ -114,8 +114,8 @@ def test_timeout_slow_response
114
114
  assert_nil buf
115
115
  assert diff > 1.0, "diff was #{diff.inspect}"
116
116
  assert diff < 60.0
117
- ensure
118
- Process.kill(:TERM, pid) rescue nil
117
+ ensure
118
+ Process.kill(:TERM, pid) rescue nil
119
119
  end
120
120
 
121
121
  def test_response_write
@@ -57,8 +57,8 @@ def test_bind_listen_unix
57
57
  assert File.readable?(@unix_listener_path), "not readable"
58
58
  assert File.writable?(@unix_listener_path), "not writable"
59
59
  assert_equal 0777, File.umask
60
- ensure
61
- File.umask(old_umask)
60
+ ensure
61
+ File.umask(old_umask)
62
62
  end
63
63
 
64
64
  def test_bind_listen_unix_umask
@@ -71,8 +71,8 @@ def test_bind_listen_unix_umask
71
71
  assert_equal @unix_listener_path, sock_name(@unix_listener)
72
72
  assert_equal 0140700, File.stat(@unix_listener_path).mode
73
73
  assert_equal 0777, File.umask
74
- ensure
75
- File.umask(old_umask)
74
+ ensure
75
+ File.umask(old_umask)
76
76
  end
77
77
 
78
78
  def test_bind_listen_unix_idempotent
@@ -11,7 +11,7 @@
11
11
 
12
12
  Gem::Specification.new do |s|
13
13
  s.name = %q{unicorn}
14
- s.version = (ENV['VERSION'] || '5.4.0').dup
14
+ s.version = (ENV['VERSION'] || '5.4.1').dup
15
15
  s.authors = ['unicorn hackers']
16
16
  s.summary = 'Rack HTTP server for fast clients and Unix'
17
17
  s.description = File.read('README').split("\n\n")[1]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - unicorn hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-23 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  requirements: []
290
290
  rubyforge_project:
291
- rubygems_version: 2.7.3
291
+ rubygems_version: 2.7.7
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: Rack HTTP server for fast clients and Unix