fakefs 0.9.2 → 0.9.3

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
  SHA1:
3
- metadata.gz: b9f9df4a437b257a48a59a49e7a5c5a04ab1bbe6
4
- data.tar.gz: ed42685cfdae7eebeafb2069e3055c298bd189c9
3
+ metadata.gz: ea957af228d52583f2b6aca6ed6499df8b57036a
4
+ data.tar.gz: ccf8113df4be046c382f21df104ddc5cc3bd569b
5
5
  SHA512:
6
- metadata.gz: cf1309391825fafa8ae30e35a52e8703faa55531da6140b777cc10d3302e978a2e7643140cac02b278d5348114232d78429aaafa9bd542894781a2f8ad90c53c
7
- data.tar.gz: cca5b5206a5d8c09bcbdab4d8a06a6510fb80c7aa6e2446c30169f0209e0a15c066060cb1e201d55054913e2e33866868ea4f013e062b4038fedcedd59044dc8
6
+ metadata.gz: 5150ca1c947b1da5a27ae7708e4bd9f2abd442ccedc5b4be9a3d6428e18828c275395caddc567b5bc6385f04ae027772c2ccee00b83474573e0d98a9a194f2ce
7
+ data.tar.gz: 42006bad3ce9c0d9a53de5ea2638ce4c6cb0d39ed8451d95c6d9cec4180598225d835952fc69fb17abd019507a740209265e45a4a0d1e891fe64f86f0a0d0eae
@@ -90,7 +90,7 @@ module FakeFS
90
90
  fail Errno::ENOENT, dir unless new_dir
91
91
 
92
92
  dir_levels.push dir unless blk
93
- blk.call(dir) if blk
93
+ yield(dir) if blk
94
94
  ensure
95
95
  dir_levels.pop if blk
96
96
  end
@@ -128,7 +128,7 @@ module FakeFS
128
128
  directories_under(dir).map do |d|
129
129
  d.entries.select do |f|
130
130
  (f.is_a?(FakeFile) || f.is_a?(FakeDir)) &&
131
- f.name.match(/\A(?!\.)/)
131
+ f.name.match(/\A(?!\.)/)
132
132
  end
133
133
  end.flatten.uniq
134
134
  when []
@@ -127,6 +127,13 @@ module FakeFS
127
127
  cp(src, dest)
128
128
  end
129
129
 
130
+ def copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
131
+ cp_r(src, dest,
132
+ preserve: preserve,
133
+ dereference_root: dereference_root,
134
+ remove_destination: remove_destination)
135
+ end
136
+
130
137
  def cp_r(src, dest, options = {})
131
138
  # handle `verbose' flag
132
139
  RealFileUtils.cp_r src, dest, options.merge(noop: true)
@@ -204,10 +211,10 @@ module FakeFS
204
211
  list.each do |f|
205
212
  if File.exist?(f)
206
213
  uid = if user
207
- user.to_s.match(/\d+/) ? user.to_i : Etc.getpwnam(user).uid
214
+ user.to_s =~ /\d+/ ? user.to_i : Etc.getpwnam(user).uid
208
215
  end
209
216
  gid = if group
210
- group.to_s.match(/\d+/) ? group.to_i : Etc.getgrnam(group).gid
217
+ group.to_s =~ /\d+/ ? group.to_i : Etc.getgrnam(group).gid
211
218
  end
212
219
  File.chown(uid, gid, f)
213
220
  else
@@ -64,12 +64,12 @@ module FakeFS
64
64
  pattern = pattern.to_s
65
65
 
66
66
  regex_body = pattern.gsub('.', '\.')
67
- .gsub('+') { '\+' }
68
- .gsub('?', '.')
69
- .gsub('*', '.*')
70
- .gsub('(', '\(')
71
- .gsub(')', '\)')
72
- .gsub('$', '\$')
67
+ .gsub('+') { '\+' }
68
+ .gsub('?', '.')
69
+ .gsub('*', '.*')
70
+ .gsub('(', '\(')
71
+ .gsub(')', '\)')
72
+ .gsub('$', '\$')
73
73
 
74
74
  # This matches nested braces and attempts to do something correct most of the time
75
75
  # There are known issues (i.e. {,*,*/*}) that cannot be resolved with out a total
@@ -1,7 +1,7 @@
1
1
  module FakeFS
2
2
  # Version module
3
3
  module Version
4
- VERSION = '0.9.2'
4
+ VERSION = '0.9.3'
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.9.2
4
+ version: 0.9.3
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: 2016-10-04 00:00:00.000000000 Z
15
+ date: 2016-10-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -62,14 +62,14 @@ dependencies:
62
62
  requirements:
63
63
  - - "~>"
64
64
  - !ruby/object:Gem::Version
65
- version: 0.35.0
65
+ version: 0.41.2
66
66
  type: :development
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - "~>"
71
71
  - !ruby/object:Gem::Version
72
- version: 0.35.0
72
+ version: 0.41.2
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: bump
75
75
  requirement: !ruby/object:Gem::Requirement