fakefs 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fakefs/file.rb +6 -1
- data/lib/fakefs/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: 825da63678bcf85ba7a0e7fdcdf067da5477187ffb2e5d982bcdae72084b8ea6
|
4
|
+
data.tar.gz: 7d860f9926de5b203041b652ff4692731dfd5c34846908c48bc02e6b853e0dd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 649a2c7d8c39458f3c81cdaf7eade2a5203fa5b1c33ac7e243e94afbb4da4dad6029772ee708d7034b6ad70ca15549e6bbb028967a92183b4bb26780c5374b6f
|
7
|
+
data.tar.gz: cded1748b5a782e70923bf9cf3111f91cd2f06cb749db05768b2a619c884041a508e49221b2ddf775ac340bc76dd47bb26da1c397a6cd7f9b9dc99eedd22005b
|
data/lib/fakefs/file.rb
CHANGED
@@ -331,6 +331,11 @@ module FakeFS
|
|
331
331
|
File.read(file, length, offset, mode: 'rb:ASCII-8BIT')
|
332
332
|
end
|
333
333
|
|
334
|
+
def self.binwrite(file, content, offset = nil)
|
335
|
+
mode = offset ? 'r+b:ASCII-8BIT' : 'wb:ASCII-8BIT'
|
336
|
+
File.write(file, content, offset, mode: mode)
|
337
|
+
end
|
338
|
+
|
334
339
|
def self.fnmatch?(pattern, path, flags = 0)
|
335
340
|
RealFile.fnmatch?(pattern, path, flags)
|
336
341
|
end
|
@@ -658,7 +663,7 @@ module FakeFS
|
|
658
663
|
|
659
664
|
def self.write(filename, contents, offset = nil, open_args = {})
|
660
665
|
offset, open_args = nil, offset if offset.is_a?(Hash)
|
661
|
-
mode = offset ? '
|
666
|
+
mode = offset ? 'r+' : 'w'
|
662
667
|
if open_args.any?
|
663
668
|
if open_args[:open_args]
|
664
669
|
args = [filename, *open_args[:open_args]]
|
data/lib/fakefs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fakefs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2022-
|
15
|
+
date: 2022-05-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bump
|