unicorn 5.2.0 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -851,24 +851,6 @@ def test_empty_header
851
851
  assert_equal '', parser.env['HTTP_HOST']
852
852
  end
853
853
 
854
- # so we don't care about the portability of this test
855
- # if it doesn't leak on Linux, it won't leak anywhere else
856
- # unless your C compiler or platform is otherwise broken
857
- LINUX_PROC_PID_STATUS = "/proc/self/status"
858
- def test_memory_leak
859
- match_rss = /^VmRSS:\s+(\d+)/
860
- if File.read(LINUX_PROC_PID_STATUS) =~ match_rss
861
- before = $1.to_i
862
- 1000000.times { Unicorn::HttpParser.new }
863
- File.read(LINUX_PROC_PID_STATUS) =~ match_rss
864
- after = $1.to_i
865
- diff = after - before
866
- assert(diff < 10000, "memory grew more than 10M: #{diff}")
867
- end
868
- end if RUBY_PLATFORM =~ /linux/ &&
869
- File.readable?(LINUX_PROC_PID_STATUS) &&
870
- !defined?(RUBY_ENGINE)
871
-
872
854
  def test_memsize
873
855
  require 'objspace'
874
856
  if ObjectSpace.respond_to?(:memsize_of)
@@ -150,28 +150,31 @@ def test_sock_name
150
150
  end
151
151
 
152
152
  def test_tcp_defer_accept_default
153
+ return unless defined?(TCP_DEFER_ACCEPT)
153
154
  port = unused_port @test_addr
154
155
  name = "#@test_addr:#{port}"
155
156
  sock = bind_listen(name)
156
157
  cur = sock.getsockopt(Socket::SOL_TCP, TCP_DEFER_ACCEPT).unpack('i')[0]
157
158
  assert cur >= 1
158
- end if defined?(TCP_DEFER_ACCEPT)
159
+ end
159
160
 
160
161
  def test_tcp_defer_accept_disable
162
+ return unless defined?(TCP_DEFER_ACCEPT)
161
163
  port = unused_port @test_addr
162
164
  name = "#@test_addr:#{port}"
163
165
  sock = bind_listen(name, :tcp_defer_accept => false)
164
166
  cur = sock.getsockopt(Socket::SOL_TCP, TCP_DEFER_ACCEPT).unpack('i')[0]
165
167
  assert_equal 0, cur
166
- end if defined?(TCP_DEFER_ACCEPT)
168
+ end
167
169
 
168
170
  def test_tcp_defer_accept_nr
171
+ return unless defined?(TCP_DEFER_ACCEPT)
169
172
  port = unused_port @test_addr
170
173
  name = "#@test_addr:#{port}"
171
174
  sock = bind_listen(name, :tcp_defer_accept => 60)
172
175
  cur = sock.getsockopt(Socket::SOL_TCP, TCP_DEFER_ACCEPT).unpack('i')[0]
173
176
  assert cur > 1
174
- end if defined?(TCP_DEFER_ACCEPT)
177
+ end
175
178
 
176
179
  def test_ipv6only
177
180
  port = begin
@@ -186,6 +189,7 @@ def test_ipv6only
186
189
  end
187
190
 
188
191
  def test_reuseport
192
+ return unless defined?(Socket::SO_REUSEPORT)
189
193
  port = unused_port @test_addr
190
194
  name = "#@test_addr:#{port}"
191
195
  sock = bind_listen(name, :reuseport => true)
@@ -193,5 +197,5 @@ def test_reuseport
193
197
  assert_operator cur, :>, 0
194
198
  rescue Errno::ENOPROTOOPT
195
199
  # kernel does not support SO_REUSEPORT (older Linux)
196
- end if defined?(Socket::SO_REUSEPORT)
200
+ end
197
201
  end
@@ -69,7 +69,7 @@ def test_reopen_logs_renamed_with_encoding
69
69
  }
70
70
  }
71
71
  tmp.close!
72
- end if STDIN.respond_to?(:external_encoding)
72
+ end
73
73
 
74
74
  def test_reopen_logs_renamed_with_internal_encoding
75
75
  tmp = Tempfile.new('')
@@ -101,5 +101,5 @@ def test_reopen_logs_renamed_with_internal_encoding
101
101
  }
102
102
  }
103
103
  tmp.close!
104
- end if STDIN.respond_to?(:external_encoding)
104
+ end
105
105
  end
data/unicorn.gemspec CHANGED
@@ -1,9 +1,6 @@
1
1
  # -*- encoding: binary -*-
2
- ENV["VERSION"] or abort "VERSION= must be specified"
3
- manifest = File.readlines('.manifest').map! { |x| x.chomp! }
4
- require 'olddoc'
5
- extend Olddoc::Gemspec
6
- name, summary, title = readme_metadata
2
+ manifest = File.exist?('.manifest') ?
3
+ IO.readlines('.manifest').map!(&:chomp!) : `git ls-files`.split("\n")
7
4
 
8
5
  # don't bother with tests that fork, not worth our time to get working
9
6
  # with `gem check -t` ... (of course we care for them when testing with
@@ -14,16 +11,18 @@
14
11
 
15
12
  Gem::Specification.new do |s|
16
13
  s.name = %q{unicorn}
17
- s.version = ENV["VERSION"].dup
18
- s.authors = ["#{name} hackers"]
19
- s.summary = summary
20
- s.description = readme_description
14
+ s.version = (ENV['VERSION'] || '5.3.1').dup
15
+ s.authors = ['unicorn hackers']
16
+ s.summary = 'Rack HTTP server for fast clients and Unix'
17
+ s.description = File.read('README').split("\n\n")[1]
21
18
  s.email = %q{unicorn-public@bogomips.org}
22
19
  s.executables = %w(unicorn unicorn_rails)
23
20
  s.extensions = %w(ext/unicorn_http/extconf.rb)
24
- s.extra_rdoc_files = extra_rdoc_files(manifest)
21
+ s.extra_rdoc_files = IO.readlines('.document').map!(&:chomp!).keep_if do |f|
22
+ File.exist?(f)
23
+ end
25
24
  s.files = manifest
26
- s.homepage = Olddoc.config['rdoc_url']
25
+ s.homepage = 'https://bogomips.org/unicorn/'
27
26
  s.test_files = test_files
28
27
 
29
28
  # technically we need ">= 1.9.3", too, but avoid the array here since
@@ -40,7 +39,6 @@
40
39
  s.add_dependency(%q<raindrops>, '~> 0.7')
41
40
 
42
41
  s.add_development_dependency('test-unit', '~> 3.0')
43
- s.add_development_dependency('olddoc', '~> 1.2')
44
42
 
45
43
  # Note: To avoid ambiguity, we intentionally avoid the SPDX-compatible
46
44
  # 'Ruby' here since Ruby 1.9.3 switched to BSD-2-Clause, but we
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.2.0
4
+ version: 5.3.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: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: olddoc
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.2'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.2'
83
69
  description: |-
84
70
  unicorn is an HTTP server for Rack applications designed to only serve
85
71
  fast clients on low-latency, high-bandwidth connections and take
@@ -264,6 +250,7 @@ files:
264
250
  - test/exec/README
265
251
  - test/exec/test_exec.rb
266
252
  - test/test_helper.rb
253
+ - test/unit/test_ccc.rb
267
254
  - test/unit/test_configurator.rb
268
255
  - test/unit/test_droplet.rb
269
256
  - test/unit/test_http_parser.rb
@@ -301,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
288
  version: '0'
302
289
  requirements: []
303
290
  rubyforge_project:
304
- rubygems_version: 2.6.7
291
+ rubygems_version: 2.6.13
305
292
  signing_key:
306
293
  specification_version: 4
307
294
  summary: Rack HTTP server for fast clients and Unix