fakefs 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b44fd4b36d76a0fd4201c8d65438b10f916e19ad111b857f1b4b83269c3a3911
4
- data.tar.gz: 9c2ae1a1a131116c1aac45e4bac9791a55c430862dc24d85c97053656ecea050
3
+ metadata.gz: c8d3965dbbf1ecf0b72f277937f25784a397d92488991ec7c29831c64b0d86fc
4
+ data.tar.gz: b8c209e6b8d1d337c533c30ecf3fc937a06171103189613fb1b15892f4c7005f
5
5
  SHA512:
6
- metadata.gz: 8d092e26a0b3ac14a75807243fae5d5e297fed1b24884182553fc5cd8b943cb867e73aac2a16c461abe2279db1102190b94db33120b0292560ad768037c319ab
7
- data.tar.gz: e73736a37d2b9476af943802b4496d751c1aba4a6ba9ce20aca77cbed665a2ddd9e294e95d89b07c180addfc4c3c54e895afd04538f39d8cda538f4faa6b66c6
6
+ metadata.gz: 4d19c0a2dbd139c13a8191b752526e99b13b5991aad56e074a3f4d13d7452b5864bdff8cdbfe72ee62991f9aaff72d74a7b4c49383393fbaa6bc4d68453b6f84
7
+ data.tar.gz: 6ca4163b3cc7d189fcad6014d640f2a36af03030ef078401724539a05a593a0c1b036136eae6a494bb9c51d3f77fecaf24bc0461edf98579ee8eee583c3ba1e5
@@ -53,6 +53,10 @@ module FakeFS
53
53
  class << self
54
54
  alias exists? exist?
55
55
 
56
+ def identical?(one_path, another_path)
57
+ FileSystem.find(one_path) == FileSystem.find(another_path)
58
+ end
59
+
56
60
  # Assume nothing is sticky.
57
61
  def sticky?(_path)
58
62
  false
@@ -253,14 +257,15 @@ module FakeFS
253
257
  0
254
258
  end
255
259
 
256
- def self.delete(*file_names)
257
- file_names.each do |file_name|
258
- raise Errno::ENOENT, file_name.to_s unless exists?(file_name)
260
+ def self.delete(*files)
261
+ files.each do |file|
262
+ file_name = (file.class == FakeFS::File ? file.path : file.to_s)
263
+ raise Errno::ENOENT, file_name unless exists?(file_name)
259
264
 
260
265
  FileUtils.rm(file_name)
261
266
  end
262
267
 
263
- file_names.size
268
+ files.size
264
269
  end
265
270
 
266
271
  class << self
@@ -523,7 +528,7 @@ module FakeFS
523
528
  end
524
529
 
525
530
  def is_a?(klass)
526
- RealFile.allocate.is_a?(klass)
531
+ RealFile.is_a?(klass)
527
532
  end
528
533
 
529
534
  def string
@@ -1,7 +1,7 @@
1
1
  module FakeFS
2
2
  # Version module
3
3
  module Version
4
- VERSION = '1.2.0'.freeze
4
+ VERSION = '1.2.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: 1.2.0
4
+ version: 1.2.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: 2020-03-24 00:00:00.000000000 Z
15
+ date: 2020-04-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bump