fakefs 0.20.0 → 0.20.1

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: 54f3f5584483097c4ba4c7d40c6912fbb52df5a7a997a98377ad771ad2a54d6d
4
- data.tar.gz: adb831cf13a0f17bb9e410ceb8b1fa5f9bfa810c4879dde4a8d622d9f9ca0b3c
3
+ metadata.gz: aadee89f971fb1f27f98b079ecacd7c5583f236d9cc8ed16b901416d2025dfde
4
+ data.tar.gz: b154742fd30370afa9a2f549f3ca6e1d99d5aac2f2e590cd7ea18e0494d35770
5
5
  SHA512:
6
- metadata.gz: 5773c49c57fee658c7fdc4d546233beb7af67d9da479cf4e328c1fb2d81f54f119ed474ee6af1a490aa18eae8dfa75b7259cb0d177068b8f499f2a6faefe92f5
7
- data.tar.gz: 3817e2826e858e6eb8de9ed98a053917f7865ef6555b3d364c2938eaec406a05b86a3ba9a41345e71460297940475092323537fbfc532df9bd18f1a4cc61a884
6
+ metadata.gz: 8d61de46958820e9f75022a86d0dbe1c793a49831359c446c442a9f602fdb73003b65f38a01fdc8cea06e6c7d6635485c21ba26b5e0b5fe7293c5dd7e74b4e7d
7
+ data.tar.gz: 4daebc8476e2c2dede2937f12d97fe389a26c1021cb6fe2e3e5ba30964b849d618eca659cb08aa8babd14a3d90be167dbfc64b738541612d0237acc0f0f043bb
@@ -787,9 +787,12 @@ module FakeFS
787
787
  end
788
788
 
789
789
  # See <tt>File.write</tt>. Returns the number of bytes written.
790
- def write(path, data)
791
- File.open(path, 'wb') do |file|
792
- return file.write(data)
790
+ def write(string, *args)
791
+ offset = args[0]
792
+ open_args = args[1]
793
+ File.open(@path, open_args || 'w') do |file|
794
+ file.seek(offset) if offset
795
+ return file.write(string)
793
796
  end
794
797
  end
795
798
  end
@@ -1,7 +1,7 @@
1
1
  module FakeFS
2
2
  # Version module
3
3
  module Version
4
- VERSION = '0.20.0'.freeze
4
+ VERSION = '0.20.1'.freeze
5
5
 
6
6
  def self.to_s
7
7
  VERSION
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: 0.20.0
4
+ version: 0.20.1
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: 2019-03-14 00:00:00.000000000 Z
15
+ date: 2019-05-01 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bump