John Bintz
005ddaaeb2
allow for {p,q} literals in globs
2011-02-18 16:14:13 -05:00
Noah Paessel
f366142c64
add file#split
2011-01-18 20:22:26 -05:00
Mariusz Pietrzyk
66c27ff31b
FakeFS::Dir.glob works with a given block. Closes #39 . Closes #55 .
2010-12-27 12:52:32 -05:00
Greg Campbell
4e9355dc9e
FileUtils.mv can now handle an array of sources
...
Closes #40 . Closes #56
2010-12-27 12:49:48 -05:00
Greg Campbell
b91fddf98b
Allows FileUtils.mv to move into a directory.
...
This addresses the first comment on #40 .
2010-12-27 12:48:56 -05:00
Scott Taylor
9505210a90
handle FileUtils.mkdir. Closes #37
...
Conflicts:
test/fakefs_test.rb
2010-12-27 12:43:32 -05:00
Scott Taylor
4bf5f91774
whitespace
2010-12-27 12:36:41 -05:00
Aaron Suggs
076ef40678
Add File.rename (a primitive of FileUtils.mv). Closes #29
2010-12-27 12:36:11 -05:00
Scott Taylor
d422c6a79f
Add File.utime for updating files' mtime. Closes #28
...
Conflicts:
lib/fakefs/file.rb
test/fakefs_test.rb
2010-12-27 12:01:45 -05:00
Víctor Martínez
82db05e85d
Implemented File.autoclose?, File.autoclose=, File.fdatasync and File.size which are new on ruby-1.9.2
2010-12-15 23:01:54 -05:00
Víctor Martínez
8354db1b77
Implemented File.ctime, File.stat(file).ctime, File.open(file){|f| f.ctime }, File.mtime, File.stat(file).mtime and File.open(file){|f| f.mtime }
2010-12-15 23:00:03 -05:00
Scott Taylor
f59e9ba94e
whitespace fix
2010-12-15 22:55:56 -05:00
marano
25c3b4e632
Fixed issue where Dir glob would not work properly when doing /**/*.
2010-12-15 22:53:29 -05:00
Greg Campbell
c2a9c13345
FileUtils.mv accepts options. Closes #35 .
2010-07-03 04:58:05 -04:00
Greg Campbell
97a68c01ba
FileUtils#mkdir_p accepts options. Closes #41 .
2010-07-03 04:57:45 -04:00
Scott Taylor
491da764d1
Return true from FakeFS::activate! and ::deactivate!
2010-01-12 08:36:23 -05:00
Scott Taylor
8ae8692ec7
Fix a test name
2010-01-12 08:33:39 -05:00
Scott Taylor
2296655ca9
Call FakeFS.activate! && FakeFS.deactivate! when surrounding RealFileUtils - "test/subdir" was accidentally being created on the file system
2009-12-04 04:50:04 -05:00
Scott Taylor
b346c80e19
Cleanup "here" test helper
2009-12-04 04:48:56 -05:00
Scott Taylor
7f601eb7fc
RealFileUtils makes calls to ::File && ::Dir - so we need to deactivate FakeFS if we intend RealFileUtils to use the RealFile and RealDir class. Closes #24
2009-12-02 03:18:09 -05:00
Scott Taylor
8355d15ec2
activate! & deactivate! state properly in tests (which allows easy replication of bug reported in #24 )
2009-12-02 03:18:09 -05:00
Scott Taylor
c2ccf482b9
Extract common requires in test files to test/test_helper.rb Run individual spec files with RUBYLIB=test ruby test/<test-file> (Thanks mislav)
2009-12-02 03:18:09 -05:00
Scott Taylor
52462b0e46
Use require 'fakefs/safe' in test helper requires. Temporarily fixes #24
2009-12-02 03:18:03 -05:00
Keita Urashima
9212ba104a
FileUtils.rm should be able to delete two or more files. Closes #23
2009-11-25 22:33:29 -05:00
Scott Taylor
50193f2a75
Add FileTest#exist? Swap out FileTest for FakeFS::FileTest. Closes #14
2009-11-24 04:48:43 -05:00
Scott Taylor
bdb3fa4ac0
raise Errno::EEXIST when Dir.mkdir is called with an existing directory. Closes #21 .
2009-11-24 04:13:29 -05:00
Scott Taylor
f9e665bda9
Fix a test for ruby 1.9.1 (question mark *must* end the method in 1.9.1?)
2009-11-08 13:27:51 -05:00
Scott Taylor
f30beb33fe
Fix a test name
2009-11-08 13:27:51 -05:00
Scott Taylor
02b76af287
Add File#to_i (an alias for fileno)
2009-11-08 13:27:51 -05:00
Scott Taylor
1e685ed25e
Implement File#to_io
2009-11-08 13:27:50 -05:00
Scott Taylor
2877f7d4c1
Cleanup trailing whitespace
2009-11-08 01:04:16 -05:00
Scott Taylor
d2264eb646
Fix FakeFS#close
2009-11-08 00:56:00 -05:00
Scott Taylor
dd8ff05eec
Make sure that no StringIO instance methods leak out FakeFS::File that aren't in File
2009-11-05 03:25:04 -05:00
Scott Taylor
daad2bb625
Ensure that every method in IO and File (RealFile) is in FakeFS::File (since File < IO). raise NotImplemenetedErrors for methods which have not yet been implemented.
2009-11-05 03:22:39 -05:00
Scott Taylor
ba4de58233
Add File#pos=, File#tell=
2009-11-05 03:21:53 -05:00
Scott Taylor
9e50475cb3
Add File#pos
2009-11-05 03:21:49 -05:00
Jon Yurek
bfffa910e9
Bitmask file creation modes allow for Tempfile compatability.
2009-10-30 09:53:39 -07:00
Sam Goldstein
1c6825fb9b
added support for recursive globbing
...
FakeDir.glob now handles recursive globs (i.e. '**') like the standard
lib Dir. Previously they were treated identically to single wild cards
(i.e. '*')
Resolves issue #16
http://github.com/defunkt/fakefs/issues#issue/16
2009-10-29 09:26:54 -07:00
Scott Taylor
01b0421c49
Add File#seek. Fixes Github Issue #19
2009-10-29 05:46:39 -04:00
Scott Taylor
6f5cff81ca
Add binary mode. Resolves Github #13
2009-10-29 05:46:39 -04:00
Scott Barron
838274f965
Dir.entries returns only basenames, not full paths - make FakeFS match that behavior
2009-10-27 00:27:34 +08:00
dmathieu
20ef508317
Refactoring ln_sf and testing it
2009-10-14 15:36:13 +08:00
Nick Quaranto
8f26158a5a
Adding a passable implementation of File.mtime
2009-10-07 00:13:58 -07:00
Nick Quaranto
72e8ee62c7
Allowing File#read to chunk IO
2009-10-07 00:08:20 -07:00
Nick Quaranto
5deda9b456
File.size? actually returns nil instead of false
2009-10-07 00:06:43 -07:00
Nick Quaranto
e591d3b2d3
Adding File.size? too
2009-10-07 00:06:36 -07:00
Nick Quaranto
166ff444d9
Aliasing File.readable? to File.exist? so Rack::File can work
2009-10-07 00:06:28 -07:00
Scott Taylor
c00d450662
Add File::delete and alias File::unlink. Get those, plus FileUtils.rm to work properly with hard links. Closes #8
2009-10-01 02:52:02 -04:00
Scott Taylor
bdcdc26d49
Add hard links. Closes #11
2009-10-01 02:46:07 -04:00
Scott Taylor
7e927d8ff0
Add File.symlink as an alias for FileUtils.ln_s
2009-10-01 02:46:07 -04:00