fakefs 1.2.0 → 1.2.1
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 +10 -5
- 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: c8d3965dbbf1ecf0b72f277937f25784a397d92488991ec7c29831c64b0d86fc
|
4
|
+
data.tar.gz: b8c209e6b8d1d337c533c30ecf3fc937a06171103189613fb1b15892f4c7005f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d19c0a2dbd139c13a8191b752526e99b13b5991aad56e074a3f4d13d7452b5864bdff8cdbfe72ee62991f9aaff72d74a7b4c49383393fbaa6bc4d68453b6f84
|
7
|
+
data.tar.gz: 6ca4163b3cc7d189fcad6014d640f2a36af03030ef078401724539a05a593a0c1b036136eae6a494bb9c51d3f77fecaf24bc0461edf98579ee8eee583c3ba1e5
|
data/lib/fakefs/file.rb
CHANGED
@@ -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(*
|
257
|
-
|
258
|
-
|
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
|
-
|
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.
|
531
|
+
RealFile.is_a?(klass)
|
527
532
|
end
|
528
533
|
|
529
534
|
def string
|
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.2.
|
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-
|
15
|
+
date: 2020-04-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bump
|