Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Optional arguments for Dir.glob and FileUtils.cp_r #182

Closed
wants to merge 2 commits into from

3 participants

Jan Wedekind DSIW Scott Taylor
Jan Wedekind

In this implementation Dir.glob and FileUtils.cp_r accept optional arguments. The arguments are ignored.

wedesoft added some commits
DSIW

FileUtils.cp needs the optional options hash, too.

Scott Taylor
Collaborator

No tests :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 14, 2012
  1. Jan Wedekind

    Update lib/fakefs/fileutils.rb

    wedesoft authored
    Added optional argument to FileUtils#cp_r (ignored)
Commits on Jan 18, 2013
  1. Jan Wedekind
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/fakefs/dir.rb
  2. +1 −1  lib/fakefs/fileutils.rb
2  lib/fakefs/dir.rb
View
@@ -90,7 +90,7 @@ def self.foreach(dirname, &block)
Dir.open(dirname) { |file| yield file }
end
- def self.glob(pattern, &block)
+ def self.glob(pattern, flags = 0, &block)
matches_for_pattern = lambda do |matcher|
[FileSystem.find(matcher) || []].flatten.map{|e|
Dir.pwd.match(%r[\A/?\z]) || !e.to_s.match(%r[\A#{Dir.pwd}/?]) ? e.to_s : e.to_s.match(%r[\A#{Dir.pwd}/?]).post_match}.sort
2  lib/fakefs/fileutils.rb
View
@@ -81,7 +81,7 @@ def cp(src, dest)
end
end
- def cp_r(src, dest)
+ def cp_r(src, dest, options = {})
Array(src).each do |src|
# This error sucks, but it conforms to the original Ruby
# method.
Something went wrong with that request. Please try again.