epitools 0.5.68 → 0.5.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/epitools/path.rb +10 -0
- data/spec/path_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd16b1a9e260dacf57c14aa797c3e62f3494147
|
4
|
+
data.tar.gz: a4430c1b4e353d00499212393b38fd034592639f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0386c8c0bcb04edecaa233f9660bdf349854467c39b7881d4a7226027f47de824c58858998469bab1ff6d1a836aa7d5ea6b237d07a40b4e4738211afa7e44189
|
7
|
+
data.tar.gz: 570fb038069057774db9d1ceedb44bcdc2302e604569b51b3d51a775262ef55a2af22e465ba2cbfaf1b44bfb83997be729c212483402cb4d62054587c2600917
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.69
|
data/lib/epitools/path.rb
CHANGED
@@ -603,6 +603,16 @@ class Path
|
|
603
603
|
File.read(path, length, offset)
|
604
604
|
end
|
605
605
|
|
606
|
+
#
|
607
|
+
# Read the contents of the file, yielding it in 16k chunks. (default chunk size is 16k)
|
608
|
+
#
|
609
|
+
def each_chunk(chunk_size=2**14)
|
610
|
+
open do |f|
|
611
|
+
yield f.read(chunk_size) until f.eof?
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
615
|
+
|
606
616
|
#
|
607
617
|
# All the lines in this file, chomped.
|
608
618
|
#
|
data/spec/path_spec.rb
CHANGED