fakefs 2.7.1 → 2.8.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/dir.rb +5 -3
- 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: 7293346fcf1164e9e312a2e9dcfc9b5795fc4ba0df452f26fc2c43942f0855a7
|
4
|
+
data.tar.gz: cefca13b077629a3ada2ee8b29a047dcd7661f1b3a2d2922d2af6649fc9ef69f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258159efa60c4968941ed425eb78175e3c9bd412b235fea93361b0f442c9569de3b51d6d5f00adf5c880854d40ae8553095206666ce2324913624927c3a1f069
|
7
|
+
data.tar.gz: 6bf302764a2e765051cdd0709fa722cf6acd30df831d8211c4fdcd83e8a1ad4ad7d0cdb5286b22a8b4dfbc6de8686ca2bb24b5a30ffbf986764e239c2802b220
|
data/lib/fakefs/dir.rb
CHANGED
@@ -127,10 +127,10 @@ module FakeFS
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
def self.glob(pattern, _flags = 0, flags: _flags, base: nil, &block) # rubocop:disable Lint/UnderscorePrefixedVariableName
|
130
|
+
def self.glob(pattern, _flags = 0, flags: _flags, base: nil, sort: true, &block) # rubocop:disable Lint/UnderscorePrefixedVariableName
|
131
131
|
pwd = FileSystem.normalize_path(base || Dir.pwd)
|
132
132
|
matches_for_pattern = lambda do |matcher|
|
133
|
-
[FileSystem.find_with_glob(matcher, flags, true, dir: pwd) || []].flatten.map do |e|
|
133
|
+
matched = [FileSystem.find_with_glob(matcher, flags, true, dir: pwd) || []].flatten.map do |e|
|
134
134
|
pwd_regex = %r{\A#{pwd.gsub('+') { '\+' }}/?}
|
135
135
|
if pwd.match(%r{\A/?\z}) ||
|
136
136
|
!e.to_s.match(pwd_regex)
|
@@ -138,7 +138,9 @@ module FakeFS
|
|
138
138
|
else
|
139
139
|
e.to_s.match(pwd_regex).post_match
|
140
140
|
end
|
141
|
-
end
|
141
|
+
end
|
142
|
+
matched.sort! if sort
|
143
|
+
matched
|
142
144
|
end
|
143
145
|
|
144
146
|
files =
|
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: 2.
|
4
|
+
version: 2.8.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: 2024-12-
|
15
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bump
|