epitools 0.5.38 → 0.5.39
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/epitools/core_ext/file.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f1ff3a3fd6c4acf8419fa95fb87354aad10def9
|
|
4
|
+
data.tar.gz: 2cb1a53c82da0c000945fa678fcf2c6cff755956
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8805fe2849572feaa48d050842c02f4993a055011c514fb96adf66f31e01f7bbed7800ba54302199061d777b8142925eb251de97d91c93a989f266329c828511
|
|
7
|
+
data.tar.gz: 54739fab89cc8e77d25bb3d8bc0e79197dde2caf1c3ca9fd2451a0699521d74754a1fe3a095288bae05b0a4bff19728b2404808ff8f1a5e1c7f0c23d81466de9
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.39
|
|
@@ -28,14 +28,13 @@ class File
|
|
|
28
28
|
raise "length must be a multiple of 512" if block_aligned and length % 512 != 0
|
|
29
29
|
|
|
30
30
|
end_pos = pos
|
|
31
|
+
return nil if end_pos == 0
|
|
31
32
|
|
|
32
33
|
if block_aligned
|
|
33
34
|
misalignment = end_pos % length
|
|
34
35
|
length += misalignment
|
|
35
36
|
end
|
|
36
37
|
|
|
37
|
-
return nil if end_pos == 0
|
|
38
|
-
|
|
39
38
|
if length >= end_pos # this read will take us to the beginning of the file
|
|
40
39
|
seek(0)
|
|
41
40
|
else
|
|
@@ -61,11 +60,12 @@ class File
|
|
|
61
60
|
seek(start_pos)
|
|
62
61
|
|
|
63
62
|
while data = reverse_read(4096)
|
|
64
|
-
data += fragment
|
|
65
63
|
lines = data.lines
|
|
66
|
-
fragment
|
|
64
|
+
lines.last << fragment unless lines.last[-1] == "\n"
|
|
65
|
+
|
|
66
|
+
fragment = lines.first
|
|
67
67
|
|
|
68
|
-
lines.reverse_each { |line| yield line }
|
|
68
|
+
lines[1..-1].reverse_each { |line| yield line }
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
yield fragment
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: epitools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- epitron
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-11-
|
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|