puma 2.13.4-java → 2.14.0-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d01b8909729fc7cf60221c69146878f2c71df1b4
4
- data.tar.gz: f45503f301c52aeb9ddace8e27ed9031c25eaa83
3
+ metadata.gz: e093de7b7e1a0fc7103ebc46655aca2845fac33f
4
+ data.tar.gz: 5d68507508dd7d031053235885a9cc97c8735aea
5
5
  SHA512:
6
- metadata.gz: 59791e7926e52a3db4b7241dd75550e5256632b05eee7a75e1a367dc761adfaae339395afd28f3541436c141f795666e69c141a389465887eb9537115db34fd3
7
- data.tar.gz: ded649b73cf2d3e22668829f366138eb04f14ec77cfe3545c2fca02f5ed044efd46f844ae27e9aa7ab6524984f201326daf06a2c76b8fb7461244a5b19019d39
6
+ metadata.gz: a9cfaaa4ea9a090d4cbdf419f23d3adcad60463e4884c81bfc92250dfb5cbfacff57ae56dbf6fc107192a3f3c193be4c778870f62bf1beae89b05eaf2c0fe8df
7
+ data.tar.gz: a7b4bfea158c0dd78046abe14c2f870a2bf5dca6e12365a28c41487f1ef531c05f7cea20ffed698ae68267f15e0eee30d1eabd9f9a548114126c5b0e2a75dcb2
@@ -1,3 +1,11 @@
1
+ === 2.14.0 / 2015-09-18
2
+
3
+ * 1 minor feature:
4
+ * Make building with SSL support optional
5
+
6
+ * 1 bug fix:
7
+ * Use Rack::Builder if available. Fixes #735
8
+
1
9
  === 2.13.4 / 2015-08-16
2
10
 
3
11
  * 1 bug fix:
@@ -2,8 +2,12 @@ require 'mkmf'
2
2
 
3
3
  dir_config("puma_http11")
4
4
 
5
- if %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} and
6
- %w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
7
-
8
- create_makefile("puma/puma_http11")
5
+ unless ENV["DISABLE_SSL"]
6
+ if %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} and
7
+ %w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
8
+
9
+ have_header "openssl/bio.h"
10
+ end
9
11
  end
12
+
13
+ create_makefile("puma/puma_http11")
@@ -1,6 +1,10 @@
1
1
  #define RSTRING_NOT_MODIFIED 1
2
+
2
3
  #include <ruby.h>
3
4
  #include <rubyio.h>
5
+
6
+ #ifdef HAVE_OPENSSL_BIO_H
7
+
4
8
  #include <openssl/bio.h>
5
9
  #include <openssl/ssl.h>
6
10
  #include <openssl/dh.h>
@@ -347,6 +351,10 @@ VALUE engine_peercert(VALUE self) {
347
351
  return rb_cert_buf;
348
352
  }
349
353
 
354
+ VALUE noop(VALUE self) {
355
+ return Qnil;
356
+ }
357
+
350
358
  void Init_mini_ssl(VALUE puma) {
351
359
  VALUE mod, eng;
352
360
 
@@ -358,6 +366,8 @@ void Init_mini_ssl(VALUE puma) {
358
366
  mod = rb_define_module_under(puma, "MiniSSL");
359
367
  eng = rb_define_class_under(mod, "Engine", rb_cObject);
360
368
 
369
+ rb_define_singleton_method(mod, "check", noop, 0);
370
+
361
371
  eError = rb_define_class_under(mod, "SSLError", rb_eStandardError);
362
372
 
363
373
  rb_define_singleton_method(eng, "server", engine_init_server, 1);
@@ -371,3 +381,20 @@ void Init_mini_ssl(VALUE puma) {
371
381
 
372
382
  rb_define_method(eng, "peercert", engine_peercert, 0);
373
383
  }
384
+
385
+ #else
386
+
387
+ VALUE raise_error(VALUE self) {
388
+ rb_raise(rb_eStandardError, "SSL not available in this build");
389
+ return Qnil;
390
+ }
391
+
392
+ void Init_mini_ssl(VALUE puma) {
393
+ VALUE mod, eng;
394
+
395
+ mod = rb_define_module_under(puma, "MiniSSL");
396
+ rb_define_class_under(mod, "SSLError", rb_eStandardError);
397
+
398
+ rb_define_singleton_method(mod, "check", raise_error, 0);
399
+ }
400
+ #endif
@@ -128,6 +128,8 @@ module Puma
128
128
 
129
129
  @listeners << [str, io]
130
130
  when "ssl"
131
+ MiniSSL.check
132
+
131
133
  params = Util.parse_query uri.query
132
134
  require 'puma/minissl'
133
135
 
@@ -253,6 +255,8 @@ module Puma
253
255
  optimize_for_latency=true, backlog=1024)
254
256
  require 'puma/minissl'
255
257
 
258
+ MiniSSL.check
259
+
256
260
  host = host[1..-2] if host[0..0] == '['
257
261
  s = TCPServer.new(host, port)
258
262
  if optimize_for_latency
@@ -272,6 +276,8 @@ module Puma
272
276
 
273
277
  def inherited_ssl_listener(fd, ctx)
274
278
  require 'puma/minissl'
279
+ MiniSSL.check
280
+
275
281
  s = TCPServer.for_fd(fd)
276
282
  ssl = MiniSSL::Server.new(s, ctx)
277
283
 
@@ -123,10 +123,24 @@ module Puma
123
123
  File.basename(Dir.getwd)
124
124
  end
125
125
 
126
+ # Load and use the normal Rack builder if we can, otherwise
127
+ # fallback to our minimal version.
128
+ def rack_builder
129
+ begin
130
+ require 'rack'
131
+ require 'rack/builder'
132
+ rescue LoadError
133
+ # ok, use builtin version
134
+ return Puma::Rack::Builder
135
+ else
136
+ return ::Rack::Builder
137
+ end
138
+ end
139
+
126
140
  def load_rackup
127
141
  raise "Missing rackup file '#{rackup}'" unless File.exist?(rackup)
128
142
 
129
- rack_app, rack_options = Puma::Rack::Builder.parse_file(rackup)
143
+ rack_app, rack_options = rack_builder.parse_file(rackup)
130
144
  @options.merge!(rack_options)
131
145
 
132
146
  config_ru_binds = []
@@ -99,8 +99,8 @@ module Puma
99
99
  # too taxing on performance.
100
100
  module Const
101
101
 
102
- PUMA_VERSION = VERSION = "2.13.4".freeze
103
- CODE_NAME = "A Midsummer Code's Dream".freeze
102
+ PUMA_VERSION = VERSION = "2.14.0".freeze
103
+ CODE_NAME = "Fuchsia Friday".freeze
104
104
 
105
105
  FAST_TRACK_KA_TIMEOUT = 0.2
106
106
 
@@ -102,6 +102,8 @@ module Puma
102
102
  class SSLError < StandardError
103
103
  # Define this for jruby even though it isn't used.
104
104
  end
105
+
106
+ def self.check; end
105
107
  end
106
108
 
107
109
  class Context
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.4
4
+ version: 2.14.0
5
5
  platform: java
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-16 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement