spec/helper.rb in http-2-0.6.1 vs spec/helper.rb in http-2-0.6.3
- old
+ new
@@ -1,7 +1,11 @@
require 'http/2'
+require 'json'
+require 'coveralls'
+Coveralls.wear! if ENV["CI"]
+
include HTTP2
include HTTP2::Header
include HTTP2::Error
DATA = {
@@ -89,10 +93,10 @@
DATA, HEADERS, PRIORITY, RST_STREAM, SETTINGS, PUSH_PROMISE,
PING, GOAWAY, WINDOW_UPDATE, CONTINUATION
]
def set_stream_id(bytes, id)
- head = bytes.slice!(0,8).unpack("SCCL")
+ head = bytes.slice!(0,8).unpack('nCCN')
head[3] = id
- head.pack("SCCL") + bytes
+ head.pack('nCCN') + bytes
end