http-2 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Grigorik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-29 00:00:00.000000000 Z
12
+ date: 2015-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -37,6 +37,8 @@ files:
37
37
  - ".gitignore"
38
38
  - ".gitmodules"
39
39
  - ".rspec"
40
+ - ".rubocop.yml"
41
+ - ".rubocop_todo.yml"
40
42
  - ".travis.yml"
41
43
  - Gemfile
42
44
  - README.md
@@ -47,6 +49,7 @@ files:
47
49
  - example/keys/mycert.pem
48
50
  - example/keys/mykey.pem
49
51
  - example/server.rb
52
+ - example/upgrade_server.rb
50
53
  - http-2.gemspec
51
54
  - lib/http/2.rb
52
55
  - lib/http/2/buffer.rb
@@ -70,7 +73,6 @@ files:
70
73
  - spec/emitter_spec.rb
71
74
  - spec/framer_spec.rb
72
75
  - spec/helper.rb
73
- - spec/hpack_test_spec.rb
74
76
  - spec/huffman_spec.rb
75
77
  - spec/server_spec.rb
76
78
  - spec/stream_spec.rb
@@ -86,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
88
  requirements:
87
89
  - - ">="
88
90
  - !ruby/object:Gem::Version
89
- version: '0'
91
+ version: 2.0.0
90
92
  required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  requirements:
92
94
  - - ">="
@@ -94,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  version: '0'
95
97
  requirements: []
96
98
  rubyforge_project:
97
- rubygems_version: 2.4.3
99
+ rubygems_version: 2.4.5.1
98
100
  signing_key:
99
101
  specification_version: 4
100
102
  summary: Pure-ruby HTTP 2.0 protocol implementation
@@ -106,7 +108,6 @@ test_files:
106
108
  - spec/emitter_spec.rb
107
109
  - spec/framer_spec.rb
108
110
  - spec/helper.rb
109
- - spec/hpack_test_spec.rb
110
111
  - spec/huffman_spec.rb
111
112
  - spec/server_spec.rb
112
113
  - spec/stream_spec.rb
@@ -1,83 +0,0 @@
1
- require "helper"
2
- require 'json'
3
-
4
- describe HTTP2::Header do
5
- folders = %w[
6
- go-hpack
7
- haskell-http2-diff
8
- haskell-http2-diff-huffman
9
- haskell-http2-linear
10
- haskell-http2-linear-huffman
11
- haskell-http2-naive
12
- haskell-http2-naive-huffman
13
- haskell-http2-static
14
- haskell-http2-static-huffman
15
- #hyper-hpack
16
- nghttp2
17
- nghttp2-16384-4096
18
- nghttp2-change-table-size
19
- node-http2-hpack
20
- ]
21
-
22
- context "Decompressor" do
23
- folders.each do |folder|
24
- next if folder =~ /#/
25
- path = File.expand_path("hpack-test-case/#{folder}", File.dirname(__FILE__))
26
- Dir.exists?(path) or next
27
- context "#{folder}" do
28
- Dir.foreach(path) do |file|
29
- next if file !~ /\.json/
30
- it "should decode #{file}" do
31
- story = JSON.parse(File.read("#{path}/#{file}"))
32
- cases = story['cases']
33
- table_size = cases[0]['header_table_size'] || 4096
34
- context = story['context'] ? story['context'].to_sym : :request
35
- @dc = Decompressor.new(table_size: table_size)
36
- cases.each do |c|
37
- wire = [c['wire']].pack("H*").force_encoding('binary')
38
- @emitted = @dc.decode(HTTP2::Buffer.new(wire))
39
- headers = c['headers'].flat_map(&:to_a)
40
- @emitted.should eq headers
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end
47
-
48
- context "Compressor" do
49
- %w[
50
- LINEAR
51
- NAIVE
52
- SHORTER
53
- STATIC
54
- ].each do |mode|
55
- next if mode =~ /#/
56
- ['', 'H'].each do |huffman|
57
- [4096, 512].each do |table_size|
58
- context "with #{mode}#{huffman} mode and table_size #{table_size}" do
59
- options = eval("HTTP2::Header::#{mode}#{huffman}")
60
- path = File.expand_path("hpack-test-case/raw-data", File.dirname(__FILE__))
61
- Dir.foreach(path) do |file|
62
- next if file !~ /\.json/
63
- it "should encode #{file}" do
64
- story = JSON.parse(File.read("#{path}/#{file}"))
65
- cases = story['cases']
66
- context = story['context'] ? story['context'].to_sym : :request
67
- @cc = Compressor .new(table_size: table_size)
68
- @dc = Decompressor.new(table_size: table_size)
69
- cases.each do |c|
70
- headers = c['headers'].flat_map(&:to_a)
71
- wire = @cc.encode(headers)
72
- decoded = @dc.decode(HTTP2::Buffer.new(wire))
73
- decoded.should eq headers
74
- end
75
- end
76
- end
77
- end
78
- end
79
- end
80
- end
81
- end
82
- end
83
-