http-2 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/lib/http/2/buffer.rb +6 -4
  4. data/lib/http/2/client.rb +5 -1
  5. data/lib/http/2/compressor.rb +42 -34
  6. data/lib/http/2/connection.rb +72 -86
  7. data/lib/http/2/emitter.rb +4 -1
  8. data/lib/http/2/error.rb +2 -0
  9. data/lib/http/2/flow_buffer.rb +8 -3
  10. data/lib/http/2/framer.rb +83 -94
  11. data/lib/http/2/huffman.rb +19 -17
  12. data/lib/http/2/server.rb +9 -7
  13. data/lib/http/2/stream.rb +48 -48
  14. data/lib/http/2/version.rb +3 -1
  15. data/lib/http/2.rb +2 -0
  16. metadata +7 -60
  17. data/.autotest +0 -20
  18. data/.coveralls.yml +0 -1
  19. data/.gitignore +0 -20
  20. data/.gitmodules +0 -3
  21. data/.rspec +0 -5
  22. data/.rubocop.yml +0 -93
  23. data/.rubocop_todo.yml +0 -131
  24. data/.travis.yml +0 -17
  25. data/Gemfile +0 -16
  26. data/Guardfile +0 -18
  27. data/Guardfile.h2spec +0 -12
  28. data/Rakefile +0 -49
  29. data/example/Gemfile +0 -3
  30. data/example/README.md +0 -44
  31. data/example/client.rb +0 -122
  32. data/example/helper.rb +0 -19
  33. data/example/keys/server.crt +0 -20
  34. data/example/keys/server.key +0 -27
  35. data/example/server.rb +0 -139
  36. data/example/upgrade_client.rb +0 -153
  37. data/example/upgrade_server.rb +0 -203
  38. data/http-2.gemspec +0 -22
  39. data/lib/tasks/generate_huffman_table.rb +0 -166
  40. data/spec/buffer_spec.rb +0 -28
  41. data/spec/client_spec.rb +0 -188
  42. data/spec/compressor_spec.rb +0 -666
  43. data/spec/connection_spec.rb +0 -681
  44. data/spec/emitter_spec.rb +0 -54
  45. data/spec/framer_spec.rb +0 -487
  46. data/spec/h2spec/h2spec.darwin +0 -0
  47. data/spec/h2spec/output/non_secure.txt +0 -317
  48. data/spec/helper.rb +0 -147
  49. data/spec/hpack_test_spec.rb +0 -84
  50. data/spec/huffman_spec.rb +0 -68
  51. data/spec/server_spec.rb +0 -52
  52. data/spec/stream_spec.rb +0 -878
  53. data/spec/support/deep_dup.rb +0 -55
  54. data/spec/support/duplicable.rb +0 -98
data/spec/server_spec.rb DELETED
@@ -1,52 +0,0 @@
1
- require 'helper'
2
-
3
- RSpec.describe HTTP2::Server do
4
- include FrameHelpers
5
- before(:each) do
6
- @srv = Server.new
7
- end
8
-
9
- let(:f) { Framer.new }
10
-
11
- context 'initialization and settings' do
12
- it 'should return even stream IDs' do
13
- expect(@srv.new_stream.id).to be_even
14
- end
15
-
16
- it 'should emit SETTINGS on new connection' do
17
- frames = []
18
- @srv.on(:frame) { |recv| frames << recv }
19
- @srv << CONNECTION_PREFACE_MAGIC
20
-
21
- expect(f.parse(frames[0])[:type]).to eq :settings
22
- end
23
-
24
- it 'should initialize client with custom connection settings' do
25
- frames = []
26
-
27
- @srv = Server.new(settings_max_concurrent_streams: 200,
28
- settings_initial_window_size: 2**10)
29
- @srv.on(:frame) { |recv| frames << recv }
30
- @srv << CONNECTION_PREFACE_MAGIC
31
-
32
- frame = f.parse(frames[0])
33
- expect(frame[:type]).to eq :settings
34
- expect(frame[:payload]).to include([:settings_max_concurrent_streams, 200])
35
- expect(frame[:payload]).to include([:settings_initial_window_size, 2**10])
36
- end
37
- end
38
-
39
- it 'should allow server push' do
40
- client = Client.new
41
- client.on(:frame) { |bytes| @srv << bytes }
42
-
43
- @srv.on(:stream) do |stream|
44
- expect do
45
- stream.promise({ ':method' => 'GET' }) {}
46
- end.to_not raise_error
47
- end
48
-
49
- client.new_stream
50
- client.send headers_frame
51
- end
52
- end