fakefs 1.2.1 → 1.2.2

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: c8d3965dbbf1ecf0b72f277937f25784a397d92488991ec7c29831c64b0d86fc
4
- data.tar.gz: b8c209e6b8d1d337c533c30ecf3fc937a06171103189613fb1b15892f4c7005f
3
+ metadata.gz: 0a6b5a114927c6a04e123a9c7fb10635134bca0dcc68f7c01bddd128ba4eba50
4
+ data.tar.gz: 87e279487ecf0bfbc2f8d87660efacc0e40dc620288780957f7ed9c471ddf8dd
5
5
  SHA512:
6
- metadata.gz: 4d19c0a2dbd139c13a8191b752526e99b13b5991aad56e074a3f4d13d7452b5864bdff8cdbfe72ee62991f9aaff72d74a7b4c49383393fbaa6bc4d68453b6f84
7
- data.tar.gz: 6ca4163b3cc7d189fcad6014d640f2a36af03030ef078401724539a05a593a0c1b036136eae6a494bb9c51d3f77fecaf24bc0461edf98579ee8eee583c3ba1e5
6
+ metadata.gz: f22739a973126cde5cbe5985fa64889cd2dbed9651d979598074c580594cf2ac4f3b54850a36c8bf6480b3db16ef5085be9d828aa8ae0e71ad26031eadc70a61
7
+ data.tar.gz: c03bbc7ef81c4c3639ba42c688d86538e4cb5a36c39c0c9e79ba2da22717c7b2344f32d7d063e0190af49f3366c0162690bd44c82368c9a22b6a3e2a12fbf664
@@ -85,14 +85,14 @@ module FakeFS
85
85
  FileSystem.delete(string)
86
86
  end
87
87
 
88
- def self.entries(dirname, _opts = {})
88
+ def self.entries(dirname, _options = nil)
89
89
  _check_for_valid_file(dirname)
90
90
 
91
91
  Dir.new(dirname).map { |file| File.basename(file) }
92
92
  end
93
93
 
94
- def self.children(dirname, opts = {})
95
- entries(dirname, **opts) - ['.', '..']
94
+ def self.children(dirname, _options = nil)
95
+ entries(dirname) - ['.', '..']
96
96
  end
97
97
 
98
98
  def self.each_child(dirname, &_block)
@@ -198,7 +198,9 @@ module FakeFS
198
198
  opts = {}
199
199
  end
200
200
  tmpdir, = *rest
201
- tmpdir ||= self.tmpdir # rubocop:disable Style/RedundantSelf
201
+ tmpdir ||= self.tmpdir
202
+ Dir.mkdir(tmpdir) unless Dir.exist?(tmpdir)
203
+
202
204
  n = nil
203
205
  begin
204
206
  path = File.join(tmpdir, make_tmpname(basename, n))
@@ -528,7 +528,7 @@ module FakeFS
528
528
  end
529
529
 
530
530
  def is_a?(klass)
531
- RealFile.is_a?(klass)
531
+ RealFile.allocate.is_a?(klass)
532
532
  end
533
533
 
534
534
  def string
@@ -66,11 +66,11 @@ module FakeFS
66
66
  alias remove rm
67
67
 
68
68
  def rm_f(list, options = {})
69
- rm(list, **options.merge(force: true))
69
+ rm(list, options.merge(force: true))
70
70
  end
71
71
 
72
72
  def rm_rf(list, options = {})
73
- rm_r(list, **options.merge(force: true))
73
+ rm_r(list, options.merge(force: true))
74
74
  end
75
75
  alias rmtree rm_rf
76
76
  alias safe_unlink rm_f
@@ -109,10 +109,10 @@ module FakeFS
109
109
  if File::ALT_SEPARATOR
110
110
  SEPARATOR_LIST = "#{Regexp.quote File::ALT_SEPARATOR}" \
111
111
  "#{Regexp.quote File::SEPARATOR}".freeze
112
- SEPARATOR_PAT = /[#{SEPARATOR_LIST}]/
112
+ SEPARATOR_PAT = /[#{SEPARATOR_LIST}]/.freeze
113
113
  else
114
114
  SEPARATOR_LIST = (Regexp.quote File::SEPARATOR).to_s.freeze
115
- SEPARATOR_PAT = /#{Regexp.quote File::SEPARATOR}/
115
+ SEPARATOR_PAT = /#{Regexp.quote File::SEPARATOR}/.freeze
116
116
  end
117
117
 
118
118
  # Return a pathname which the extension of the basename is substituted by
@@ -442,9 +442,9 @@ module FakeFS
442
442
  def chop_basename(path)
443
443
  base = File.basename(path)
444
444
  if /\A#{SEPARATOR_PAT}?\z/o =~ base
445
- return nil
445
+ nil
446
446
  else
447
- return path[0, path.rindex(base)], base
447
+ [path[0, path.rindex(base)], base]
448
448
  end
449
449
  end
450
450
 
@@ -1,7 +1,7 @@
1
1
  module FakeFS
2
2
  # Version module
3
3
  module Version
4
- VERSION = '1.2.1'.freeze
4
+ VERSION = '1.2.2'.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.1
4
+ version: 1.2.2
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-04-18 00:00:00.000000000 Z
15
+ date: 2020-04-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bump
@@ -29,33 +29,19 @@ dependencies:
29
29
  - !ruby/object:Gem::Version
30
30
  version: 0.5.3
31
31
  - !ruby/object:Gem::Dependency
32
- name: minitest
32
+ name: maxitest
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  requirements:
35
35
  - - "~>"
36
36
  - !ruby/object:Gem::Version
37
- version: '5.5'
37
+ version: '3.6'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
- version: '5.5'
45
- - !ruby/object:Gem::Dependency
46
- name: minitest-rg
47
- requirement: !ruby/object:Gem::Requirement
48
- requirements:
49
- - - "~>"
50
- - !ruby/object:Gem::Version
51
- version: '5.1'
52
- type: :development
53
- prerelease: false
54
- version_requirements: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "~>"
57
- - !ruby/object:Gem::Version
58
- version: '5.1'
44
+ version: '3.6'
59
45
  - !ruby/object:Gem::Dependency
60
46
  name: rake
61
47
  requirement: !ruby/object:Gem::Requirement
@@ -90,14 +76,14 @@ dependencies:
90
76
  requirements:
91
77
  - - "~>"
92
78
  - !ruby/object:Gem::Version
93
- version: 0.58.1
79
+ version: 0.82.0
94
80
  type: :development
95
81
  prerelease: false
96
82
  version_requirements: !ruby/object:Gem::Requirement
97
83
  requirements:
98
84
  - - "~>"
99
85
  - !ruby/object:Gem::Version
100
- version: 0.58.1
86
+ version: 0.82.0
101
87
  description: A fake filesystem. Use it in your tests.
102
88
  email:
103
89
  - chris@ozmm.org
@@ -136,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
122
  requirements:
137
123
  - - ">="
138
124
  - !ruby/object:Gem::Version
139
- version: 2.3.0
125
+ version: 2.4.0
140
126
  required_rubygems_version: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - ">="