protocol-http2 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95a54d3cabb7d72cd94113264a0e0ff7d0bef7ca571ed867a9387cc9f6cbe6f2
4
- data.tar.gz: bd026f41526251de43322cbcdb2ef66bd79826abef0e65ebef2bfa3b1f59909e
3
+ metadata.gz: '0828347c63ed782f150b472ba1e832f0d7ac4c16743e55fa1ffc8debb7168995'
4
+ data.tar.gz: 14597965b1c24f791104e834fd760fec6afcdd54b82f5d8911d988593079e064
5
5
  SHA512:
6
- metadata.gz: bc52ebd072768078470fc514cc06d569edf6b6fef3f631c46739a6b10cd41de67eefdcc8d8303262ce411b19367bbdad6e957a4f9f6a9cb0bcd9ccdad4b3e4a0
7
- data.tar.gz: 5bb43ef14cef99fff2b8e3c2234a1c94ffd1041ca8641aa0d7b5d1282115fc09e4d88c464d5d9143cf6e683169e63ba52023311dcf7060275398956a0b0ee02a
6
+ metadata.gz: 05a34d0c67fc2bb89062f969e51161a47393d57d843656d02df44e56ae1d42e87f1808fa9f594886a6b11f2a1bf6b0d125ca090272f6df07fbb6ea4f409c7e4e
7
+ data.tar.gz: e2139b7457c8e05910f37f1b367cf92efc2157e73a14a69666bf8fa5109f9233ade173e2e5b7b2f3487e10ea636d6746c742ec5f3601c98fab46994b656426bf
@@ -0,0 +1,37 @@
1
+ # Copyright, 2019, by Yuta Iwama.
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Protocol
22
+ module HTTP2
23
+ module Extensions
24
+ module Sum
25
+ def sum(init = 0)
26
+ reduce(init) do |acc, v|
27
+ acc + (block_given? ? yield(v) : v)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ unless Array.instance_methods.include?(:sum)
36
+ Array.prepend(Protocol::HTTP2::Extensions::Sum)
37
+ end
@@ -19,6 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require_relative 'window_update_frame'
22
+ require_relative 'extensions/sum'
22
23
 
23
24
  module Protocol
24
25
  module HTTP2
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Protocol
22
22
  module HTTP2
23
- VERSION = "0.9.2"
23
+ VERSION = "0.9.3"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-09 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protocol-hpack
@@ -115,6 +115,7 @@ files:
115
115
  - lib/protocol/http2/continuation_frame.rb
116
116
  - lib/protocol/http2/data_frame.rb
117
117
  - lib/protocol/http2/error.rb
118
+ - lib/protocol/http2/extensions/sum.rb
118
119
  - lib/protocol/http2/extensions/unpack.rb
119
120
  - lib/protocol/http2/flow_control.rb
120
121
  - lib/protocol/http2/frame.rb