protocol-http 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protocol/http/body/file.rb +3 -3
- data/lib/protocol/http/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74eb2d15782062ec9d5dbd4b9a98c0cad45c4df4c4944f95fb447de0c08b26b5
|
4
|
+
data.tar.gz: 6787db74ca0953213cfc1e72dea596189a2532bcf8f8d4408dbcba995880b099
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d71a171d9956a9e9cfbd00896d5c75f96092b2e564e24523aa2b0b97a37de25c834fa36fecb594e663239cf5ecdeee883061468b3115fa4c7a362fd6a6b44f
|
7
|
+
data.tar.gz: 5cd9eb09c22b930186ac8752b1b0f1e29c5b5b9d371067369e98ac42f44d0c9656eb2ab8c1771d8b52dcdc81b8ee652d381fdf7358478757b60cc4e3f87176a7
|
@@ -25,14 +25,14 @@ module Protocol
|
|
25
25
|
module HTTP
|
26
26
|
module Body
|
27
27
|
class File < Readable
|
28
|
-
BLOCK_SIZE = Async::IO::
|
28
|
+
BLOCK_SIZE = Async::IO::BLOCK_SIZE
|
29
29
|
MODE = ::File::RDONLY | ::File::BINARY
|
30
30
|
|
31
31
|
def self.open(path, *args)
|
32
32
|
self.new(::File.open(path, MODE), *args)
|
33
33
|
end
|
34
34
|
|
35
|
-
def initialize(file, range = nil, block_size: BLOCK_SIZE)
|
35
|
+
def initialize(file, range = nil, size: file.size, block_size: BLOCK_SIZE)
|
36
36
|
@file = file
|
37
37
|
|
38
38
|
@block_size = block_size
|
@@ -43,7 +43,7 @@ module Protocol
|
|
43
43
|
@length = @remaining = range.size
|
44
44
|
else
|
45
45
|
@offset = 0
|
46
|
-
@length = @remaining =
|
46
|
+
@length = @remaining = size
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
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-
|
11
|
+
date: 2019-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|