aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-09-28 22:10:35 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-09-28 22:10:35 +0900
commit7eec0d3b2037518436b063135d7990dd6e05322a (patch)
tree0995ebc6835732360a79e808e9cc9cd66f54f86c
parent18d964265347a945fd09c5bb631979460d4af9d0 (diff)
parenta8600b2157ae9ac314e0a25995c96a876eeffff5 (diff)
downloadplum-7eec0d3b2037518436b063135d7990dd6e05322a.tar.gz
Merge branch 'master' into frozen-string-literal
-rw-r--r--.travis.yml4
-rw-r--r--README.md8
-rw-r--r--test/plum/test_https_connection.rb8
3 files changed, 11 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index 7415747..18ee383 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,8 +7,8 @@ install:
- echo openssl_version=1.0.2d >> $rvm_path/user/db
- rvm pkg install openssl
- $rvm_path/usr/bin/openssl version
- - rvm install 2.2.2-alpn --patch https://gist.githubusercontent.com/rhenium/b1711edcc903e8887a51/raw/2309e469f5a3ba15917d804ac61b19e62b3d8faf/ruby-openssl-alpn-no-tests-and-docs.patch --with-openssl-dir=$rvm_path/usr
- - rvm use 2.2.2-alpn
+ - rvm install 2.2.3-alpn --patch https://gist.githubusercontent.com/rhenium/b1711edcc903e8887a51/raw/2309e469f5a3ba15917d804ac61b19e62b3d8faf/ruby-openssl-alpn-no-tests-and-docs.patch --with-openssl-dir=$rvm_path/usr
+ - rvm use 2.2.3-alpn
- bundle install
script:
- bundle exec rake test
diff --git a/README.md b/README.md
index 9cb3cf4..f8bd842 100644
--- a/README.md
+++ b/README.md
@@ -6,9 +6,11 @@ A minimal implementation of HTTP/2 server.
* [rhenium/plum-server](https://github.com/rhenium/plum-server) - A example server for https://rhe.jp and http://rhe.jp.
## Requirements
-* Ruby 2.2 with [ALPN support](https://gist.github.com/rhenium/b1711edcc903e8887a51) and [ECDH support (r51348)](https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/51348/diff?format=diff) or latest Ruby 2.3.0-dev.
-* OpenSSL 1.0.2+ (HTTP/2 requires ALPN)
-* [http-parser.rb gem](https://rubygems.org/gems/http_parser.rb) (HTTP/1.1 parser; if you use "http" URI scheme).
+* Ruby
+ * Ruby 2.2 with [ALPN support patch](https://gist.github.com/rhenium/b1711edcc903e8887a51) and [ECDH support patch (r51348)](https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/51348/diff?format=diff)
+ * or latest Ruby 2.3.0-dev
+* OpenSSL 1.0.2 or newer (HTTP/2 requires ALPN)
+* [http-parser.rb gem](https://rubygems.org/gems/http_parser.rb) (HTTP/1.1 parser; if you use "http" URI scheme)
## TODO
* **Better API**
diff --git a/test/plum/test_https_connection.rb b/test/plum/test_https_connection.rb
index d8c3789..34679bc 100644
--- a/test/plum/test_https_connection.rb
+++ b/test/plum/test_https_connection.rb
@@ -47,7 +47,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
server_thread = Thread.new {
begin
- timeout(3) {
+ Timeout.timeout(3) {
sock = ssl_server.accept
plum = HTTPSConnection.new(sock)
assert_connection_error(:inadequate_security) {
@@ -55,7 +55,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
plum.run
}
}
- rescue TimeoutError
+ rescue Timeout::Error
flunk "server timeout"
ensure
tcp_server.close
@@ -64,7 +64,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
client_thread = Thread.new {
sock = TCPSocket.new("127.0.0.1", LISTEN_PORT)
begin
- timeout(3) {
+ Timeout.timeout(3) {
ctx = OpenSSL::SSL::SSLContext.new.tap {|ctx|
ctx.alpn_protocols = ["h2"]
ctx.ciphers = "AES256-GCM-SHA384"
@@ -74,7 +74,7 @@ class HTTPSConnectionNegotiationTest < Minitest::Test
ssl.write Connection::CLIENT_CONNECTION_PREFACE
ssl.write Frame.settings.assemble
}
- rescue TimeoutError
+ rescue Timeout::Error
flunk "client timeout"
ensure
sock.close